diff options
author | Devlin Junker <devlin.junker@gmail.com> | 2022-11-09 21:52:11 -0800 |
---|---|---|
committer | Benjamin Brahmer <info@b-brahmer.de> | 2022-11-17 14:50:53 +0100 |
commit | c6b4bcc00e5202e85388a0624d149e8b1df386f8 (patch) | |
tree | 7063a29710dfd0a363f3462fee8a0e8185488e15 /.github | |
parent | 760c44288256b104b662ade7a892a6ec0b898851 (diff) |
upmerging master into vue-rewrite
Signed-off-by: Devlin Junker <devlin.junker@gmail.com>
Diffstat (limited to '.github')
-rw-r--r-- | .github/dependabot.yml | 2 | ||||
-rw-r--r-- | .github/workflows/api-integration-tests.yml | 44 | ||||
-rw-r--r-- | .github/workflows/api-php-static-code-check.yml | 10 | ||||
-rw-r--r-- | .github/workflows/api-php-tests.yml | 2 | ||||
-rw-r--r-- | .github/workflows/build-release.yml | 4 | ||||
-rw-r--r-- | .github/workflows/lint-eslint.yml | 46 | ||||
-rw-r--r-- | .github/workflows/post-merge-tasks.yml | 2 |
7 files changed, 91 insertions, 19 deletions
diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 561141b9e..f863df114 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,6 +13,7 @@ updates: labels: - "dependencies" - "Skip-Changelog" + versioning-strategy: increase # Maintain dependencies for Composer - package-ecosystem: "composer" @@ -22,6 +23,7 @@ updates: labels: - "dependencies" - "Skip-Changelog" + versioning-strategy: increase # Maintain dependencies for GitHub Actions - package-ecosystem: "github-actions" diff --git a/.github/workflows/api-integration-tests.yml b/.github/workflows/api-integration-tests.yml index c9a1d4cc9..484bf38b3 100644 --- a/.github/workflows/api-integration-tests.yml +++ b/.github/workflows/api-integration-tests.yml @@ -16,7 +16,7 @@ jobs: name: "Integration: Nextcloud ${{ matrix.nextcloud }} - PHP ${{ matrix.php-versions }} - DB ${{ matrix.database }}" services: postgres: - image: postgres + image: postgres:14 env: POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} options: >- @@ -29,25 +29,27 @@ jobs: strategy: matrix: php-versions: ['7.4', '8.0'] - nextcloud: ['stable22', 'stable23'] + nextcloud: ['stable23', 'stable24', 'stable25'] database: ['sqlite', 'pgsql', 'mysql'] experimental: [false] include: - - php-versions: 8.0 + - php-versions: '8.0' nextcloud: pre-release database: sqlite experimental: true - - php-versions: 8.1 + - php-versions: '8.2' nextcloud: pre-release database: sqlite experimental: true - php-versions: 8.1 - nextcloud: stable24 + nextcloud: stable25 database: sqlite experimental: false steps: - name: Checkout uses: actions/checkout@v3 + with: + submodules: recursive - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -56,8 +58,8 @@ jobs: extensions: pdo_sqlite,pdo_mysql,pdo_pgsql,gd,zip coverage: none - - name: Setup BATS - uses: mig4/setup-bats@v1.2.0 + - name: Setup BATS & httpie + run: sudo apt-get install -y httpie && npm install -g bats@1.7.0 ### MySQL specific setup - name: Setup mysql @@ -108,6 +110,22 @@ jobs: check-code: false force: ${{ matrix.experimental }} + - name: Run API tests + working-directory: ../server + run: | + php -S localhost:8080 &> /tmp/webserver.log & + cd apps/news/tests/test_helper/feeds && php -S localhost:8090 &> /tmp/feedserver.log & + + sleep 2 + + cd ${{ github.workspace }}/../server + + bats apps/news/tests/api + + # Kill php server + kill %1 + kill %2 + - name: Setup problem matchers for PHP run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" @@ -118,7 +136,16 @@ jobs: - name: Functional tests working-directory: ../server - run: bats apps/news/tests/integration + run: | + cd apps/news/tests/test_helper/feeds && php -S localhost:8090 &> /tmp/feedserver.log & + + sleep 2 + + cd ${{ github.workspace }}/../server + + bats apps/news/tests/command + + kill %1 - name: Prep PHP tests working-directory: ../server/apps/news @@ -127,3 +154,4 @@ jobs: - name: Feed tests working-directory: ../server/apps/news run: make feed-test + diff --git a/.github/workflows/api-php-static-code-check.yml b/.github/workflows/api-php-static-code-check.yml index 662aec0a1..57776f400 100644 --- a/.github/workflows/api-php-static-code-check.yml +++ b/.github/workflows/api-php-static-code-check.yml @@ -7,15 +7,11 @@ jobs: continue-on-error: true strategy: matrix: - php-versions: [ '7.4', '8.0' ] - nextcloud: [ 'stable24' ] + php-versions: [ '7.4', '8.0', '8.1' ] + nextcloud: [ 'stable25' ] database: [ 'sqlite' ] include: - - php-versions: 8.1 - nextcloud: stable24 - database: sqlite - experimental: false - - php-versions: 8.1 + - php-versions: '8.2' nextcloud: pre-release database: sqlite experimental: true diff --git a/.github/workflows/api-php-tests.yml b/.github/workflows/api-php-tests.yml index 6ff32bbb6..0a2635316 100644 --- a/.github/workflows/api-php-tests.yml +++ b/.github/workflows/api-php-tests.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: php-versions: ['8.1'] - nextcloud: ['stable24'] + nextcloud: ['stable25'] database: ['sqlite'] experimental: [false] codecoverage: [false] diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index d82976883..06b1f4c3d 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: php-versions: ['8.1'] - nextcloud: ['stable24'] + nextcloud: ['stable25'] database: ['sqlite'] steps: - name: Checkout @@ -52,7 +52,7 @@ jobs: app_public_crt: ${{ secrets.APP_PUBLIC_CRT }} - name: Upload app tarball to release - uses: svenstaro/upload-release-action@483c1e56f95e88835747b1c7c60581215016cbf2 + uses: svenstaro/upload-release-action@133984371c30d34e38222a64855679a414cb7575 id: attach_to_release with: repo_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint-eslint.yml b/.github/workflows/lint-eslint.yml new file mode 100644 index 000000000..c08763ea9 --- /dev/null +++ b/.github/workflows/lint-eslint.yml @@ -0,0 +1,46 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Lint + +on: pull_request + +permissions: + contents: read + +concurrency: + group: lint-eslint-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + lint: + runs-on: ubuntu-latest + + name: eslint + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Read package.json node and npm engines version + uses: skjnldsv/read-package-engines-version-actions@v1.2 + id: versions + with: + fallbackNode: '^12' + fallbackNpm: '^6' + + - name: Set up node ${{ steps.versions.outputs.nodeVersion }} + uses: actions/setup-node@v3 + with: + node-version: ${{ steps.versions.outputs.nodeVersion }} + + - name: Set up npm ${{ steps.versions.outputs.npmVersion }} + run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}" + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run lint diff --git a/.github/workflows/post-merge-tasks.yml b/.github/workflows/post-merge-tasks.yml index b431399c7..6385657d3 100644 --- a/.github/workflows/post-merge-tasks.yml +++ b/.github/workflows/post-merge-tasks.yml @@ -10,7 +10,7 @@ jobs: name: "Coverage: Nextcloud PHP ${{ matrix.php-versions }}" strategy: matrix: - nextcloud: ['stable24'] + nextcloud: ['stable25'] steps: - name: Checkout uses: actions/checkout@v3 |