Add github actions
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
5500fd5c13
commit
d2bad7c771
11
.github/workflows/dependabot-approve.yml
vendored
Normal file
11
.github/workflows/dependabot-approve.yml
vendored
Normal 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
36
.github/workflows/lint.yml
vendored
Normal 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
32
.github/workflows/nodejs.yml
vendored
Normal 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
|
|
@ -16,5 +16,8 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"christophwurst/nextcloud": "^16.0",
|
"christophwurst/nextcloud": "^16.0",
|
||||||
"phpunit/phpunit": "^7."
|
"phpunit/phpunit": "^7."
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue