127 lines
3.4 KiB
YAML
127 lines
3.4 KiB
YAML
name: Acceptance Tests
|
|
|
|
on:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
coding-standard:
|
|
name: coding-standard
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: "8.4"
|
|
extensions: curl, xml, mbstring, zip
|
|
tools: composer
|
|
- name: PHP code style
|
|
run: |
|
|
make vendor-bin-codestyle
|
|
make vendor-bin-codesniffer
|
|
make test-php-style
|
|
- name: Check env var annotations
|
|
run: make check-env-var-annotations
|
|
|
|
check-gherkin-standard:
|
|
name: check-gherkin-standard
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "24"
|
|
- name: Lint feature files
|
|
run: |
|
|
npm install -g @gherlint/gherlint@1.1.0
|
|
make test-gherkin-lint
|
|
|
|
check-suites-in-expected-failures:
|
|
name: check-suites-in-expected-failures
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Check suites
|
|
run: bash tests/acceptance/check-deleted-suites-in-expected-failure.sh
|
|
|
|
build-and-test:
|
|
name: build-and-test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- name: Build ocis
|
|
run: make -C ocis build
|
|
|
|
- name: Unit tests
|
|
run: make test
|
|
|
|
acceptance-tests:
|
|
needs: [coding-standard, check-gherkin-standard, check-suites-in-expected-failures]
|
|
name: ${{ matrix.suite }}
|
|
needs: [build-and-test]
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
suite:
|
|
# graph
|
|
- apiGraph
|
|
- apiGraphGroup
|
|
- apiGraphUser
|
|
# spaces & dav
|
|
- apiSpaces
|
|
- apiSpacesShares
|
|
- apiSpacesDavOperation
|
|
- apiDownloads
|
|
- apiAsyncUpload
|
|
- apiDepthInfinity
|
|
- apiArchiver
|
|
- apiActivities
|
|
# search
|
|
- apiSearch1
|
|
# contract & locks
|
|
- apiLocks
|
|
# sharing
|
|
- apiSharingNgItemInvitation
|
|
- apiSharingNgPermissions
|
|
- apiSharingNgShares
|
|
- apiSharingNgAdditionalShareRole
|
|
- apiSharingNgDriveInvitation
|
|
- apiSharingNgItemLinkShare
|
|
- apiSharingNgDriveLinkShare
|
|
- apiSharingNgLinkShareManagement
|
|
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # 2.37.0
|
|
with:
|
|
php-version: "8.4"
|
|
extensions: curl, xml, mbstring, zip
|
|
tools: composer
|
|
|
|
- name: Run ${{ matrix.suite }}
|
|
run: BEHAT_SUITES=${{ matrix.suite }} bash tests/acceptance/run-github.sh
|
|
|
|
all-acceptance-tests:
|
|
needs: [build-and-test, acceptance-tests]
|
|
runs-on: ubuntu-latest
|
|
if: always()
|
|
steps:
|
|
- name: Check all jobs passed
|
|
run: |
|
|
if [[ "${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}" == "true" ]]; then
|
|
exit 1
|
|
fi
|