Merge pull request #207 from nextcloud/github_actions

Add github actions
This commit is contained in:
Roeland Jago Douma 2020-02-25 20:16:04 +01:00 committed by GitHub
commit 990222e064
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 82 additions and 0 deletions

View file

@ -0,0 +1,11 @@
name: Dependabot auto approve
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: hmarr/auto-approve-action@v2.0.0
if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]'
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

36
.github/workflows/lint.yml vendored Normal file
View file

@ -0,0 +1,36 @@
name: Lint
on: pull_request
jobs:
php-linters:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.2', '7.3', 7.4]
name: php${{ matrix.php-versions }} lint
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
coverage: none
- name: Lint
run: composer run lint
node-linters:
runs-on: ubuntu-latest
name: ESLint
steps:
- uses: actions/checkout@master
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: npm install
run: npm ci
- name: eslint
run: npm run lint
env:
CI: true

32
.github/workflows/nodejs.yml vendored Normal file
View file

@ -0,0 +1,32 @@
name: Node CI
on:
pull_request:
branches:
- master
- stable*
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build
run: |
npm ci
npm run build --if-present
- name: check webpack build
run: |
bash -c "[[ ! \"`git status --porcelain `\" ]] || ( echo 'Uncommited changes in webpack build' && git status && exit 1 )"
env:
CI: true

View file

@ -16,5 +16,8 @@
"require-dev": {
"christophwurst/nextcloud": "^16.0",
"phpunit/phpunit": "^7."
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
}
}