From fc68972fd09b23753c31ffe8d1157778e1089350 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Fri, 2 Oct 2020 21:30:12 +0200 Subject: [PATCH] Check app code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- .github/workflows/app-code-check.yml | 55 ++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/app-code-check.yml diff --git a/.github/workflows/app-code-check.yml b/.github/workflows/app-code-check.yml new file mode 100644 index 000000000..202d78d8c --- /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: deck + +jobs: + unit-tests: + runs-on: ubuntu-latest + + strategy: + matrix: + php-versions: ['7.4'] + server-versions: ['master', 'stable18', 'stable19', 'stable20'] + + 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@v1 + 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 }}