ci: (always|only) run e2e tests based on changes
- detect changed files for the run - let e2e files specify which related files they "watch" - only run e2e tests based on pattern matching or when generic files change - fallback to full runs if env not specified
This commit is contained in:
parent
7765153b40
commit
72749bcf70
1 changed files with 8 additions and 0 deletions
|
@ -94,6 +94,8 @@ jobs:
|
||||||
image: 'code.forgejo.org/oci/playwright:latest'
|
image: 'code.forgejo.org/oci/playwright:latest'
|
||||||
steps:
|
steps:
|
||||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 20
|
||||||
- uses: ./.forgejo/workflows-composite/setup-env
|
- uses: ./.forgejo/workflows-composite/setup-env
|
||||||
- name: "Restore frontend build"
|
- name: "Restore frontend build"
|
||||||
uses: actions/cache/restore@v4
|
uses: actions/cache/restore@v4
|
||||||
|
@ -106,11 +108,17 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
su forgejo -c 'make deps-frontend frontend'
|
su forgejo -c 'make deps-frontend frontend'
|
||||||
- uses: ./.forgejo/workflows-composite/build-backend
|
- uses: ./.forgejo/workflows-composite/build-backend
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: https://code.forgejo.org/fossdd/changed-files@v45
|
||||||
|
with:
|
||||||
|
separator: '\n'
|
||||||
- run: |
|
- run: |
|
||||||
su forgejo -c 'make generate test-e2e-sqlite'
|
su forgejo -c 'make generate test-e2e-sqlite'
|
||||||
timeout-minutes: 40
|
timeout-minutes: 40
|
||||||
env:
|
env:
|
||||||
USE_REPO_TEST_DIR: 1
|
USE_REPO_TEST_DIR: 1
|
||||||
|
CHANGED_FILES: ${{steps.changed-files.outputs.all_changed_files}}
|
||||||
test-remote-cacher:
|
test-remote-cacher:
|
||||||
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
|
if: ${{ !startsWith(vars.ROLE, 'forgejo-') }}
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
|
|
Loading…
Reference in a new issue