Folders links revised #617
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
test-unit: | |
name: Tests (unit tests) | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" # necessary for `npm run print-version` | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- run: pnpm install | |
- run: pnpm test | |
test-public: | |
name: Tests (public testing server) | |
runs-on: ubuntu-22.04 | |
if: false # FIXME disabled for now because tests not updated for CUBE version 6 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" # necessary for `npm run print-version` | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.17 | |
cache: 'pnpm' | |
- run: pnpm install | |
- run: npx playwright install --with-deps | |
- name: End-to-End tests | |
env: | |
TEST_SAFARI: yes | |
run: pnpm run test:e2e | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report-public/ | |
retention-days: 30 | |
- name: Report coverage | |
id: report | |
if: always() | |
run: pnpm run test:lcov | |
- name: Upload E2E test coverage | |
if: steps.report.outcome == 'success' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage/lcov.info | |
flags: e2etests-public | |
fail_ci_if_error: true | |
test-local: | |
name: Tests (local testing server) | |
runs-on: ubuntu-22.04 | |
if: false # FIXME disabled for now because tests not updated for CUBE version 6 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: "0" # necessary for `npm run print-version` | |
submodules: "recursive" # necessary for miniChRIS and example-dicoms | |
- uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.17 | |
cache: 'pnpm' | |
- run: pnpm install | |
- run: npx playwright install --with-deps | |
- run: pnpm run test:prepare | |
- name: End-to-End tests | |
env: | |
TEST_SAFARI: yes | |
run: pnpm run test:e2e:local | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report-local/ | |
retention-days: 30 | |
- name: Report coverage | |
id: report | |
if: always() | |
run: pnpm run test:lcov | |
- name: Upload E2E test coverage | |
if: steps.report.outcome == 'success' | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage/lcov.info | |
flags: e2etests-local | |
fail_ci_if_error: true |