Skip to content

Commit

Permalink
split up backend and frontend tests
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Kusumgar committed Nov 7, 2024
1 parent 33e67c9 commit f1256dd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 16 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: test
on: [push]
jobs:
unit-tests:
fe-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -10,16 +10,33 @@ jobs:
with:
install-packages: true

- name: Test back end
run: npm test --prefix=app/server
- name: Test front end
run: npm run coverage --prefix=app/static
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # optional (default = false)
files: ./app/static/coverage/coverage-final.json
token: ${{ secrets.CODECOV_TOKEN }} # required

be-unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: ./.github/actions/setup-and-login
with:
install-packages: true

- name: Run deps
run: ./scripts/run-dependencies.sh
- name: Test back end
run: npm test --prefix=app/server
- name: Check versions
run: npm run genversion --prefix=app/server -- --check-only
- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true # optional (default = false)
files: ./app/server/coverage/coverage-final.json,./app/static/coverage/coverage-final.json
files: ./app/server/coverage/coverage-final.json
token: ${{ secrets.CODECOV_TOKEN }} # required

integration-tests:
Expand Down
12 changes: 0 additions & 12 deletions app/static/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,4 @@ export default defineConfig({

/* Folder for test artifacts such as screenshots, videos, traces, etc. */
// outputDir: 'test-results/',

// /* Run your local dev server before starting the tests */
// webServer: {
// /**
// * Use the dev server by default for faster feedback loop.
// * Use the preview server on CI for more realistic testing.
// * Playwright will re-use the local server if there is already a dev-server running.
// */
// command: process.env.CI ? 'npm run build' : 'npm run dev',
// port: 5173,
// reuseExistingServer: !process.env.CI
// }
})

0 comments on commit f1256dd

Please sign in to comment.