diff options
author | Joas Schilling <coding@schilljs.com> | 2021-02-04 13:20:28 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2021-02-04 13:20:28 +0300 |
commit | c30fdd2c3413f8723a92675e1d11f62cdc6769b6 (patch) | |
tree | 2c94e469299c6d848ff35de78cea34aa8f1a7046 /.github | |
parent | 075a02f42fbb4036df41cec2d0de796289cae013 (diff) |
Add "App code check" github action
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/app-code-check.yml | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/.github/workflows/app-code-check.yml b/.github/workflows/app-code-check.yml new file mode 100644 index 0000000..9afc14c --- /dev/null +++ b/.github/workflows/app-code-check.yml @@ -0,0 +1,55 @@ +name: PHP AppCode Check + +on: + pull_request: + push: + branches: + - master + - stable* + +env: + APP_NAME: registration + +jobs: + unit-tests: + runs-on: ubuntu-latest + + strategy: + matrix: + php-versions: ['7.4'] + server-versions: ['stable20', 'stable21', 'master'] + + name: AppCode check php${{ matrix.php-versions }}-${{ matrix.server-versions }} + steps: + - name: Checkout server + uses: actions/checkout@v2 + with: + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 + + - name: Checkout app + uses: actions/checkout@v2 + with: + path: apps/${{ env.APP_NAME }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: phpunit + extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite + + - name: Checkout app + uses: actions/checkout@v2 + with: + path: apps/${{ env.APP_NAME }} + + - name: App code check + run: php occ app:check-code ${{ env.APP_NAME }} |