Skip to content

Commit

Permalink
Moved frontend test job to playwright
Browse files Browse the repository at this point in the history
  • Loading branch information
marekdedic committed Oct 22, 2023
1 parent 0ced37a commit 31d8767
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 35 deletions.
37 changes: 6 additions & 31 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,36 +94,6 @@ jobs:
frontend-test:
name: "Frontend test"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/[email protected]

- name: "Cache NPM dependencies"
uses: actions/[email protected]
with:
path: "~/.npm"
key: npm-dependencies-${{ runner.os }}-${{ env.cache-version }}-${{ hashFiles('package.json') }}
restore-keys: |
npm-dependencies-${{ runner.os }}-${{ env.cache-version }}-${{ hashFiles('package.json') }}
npm-dependencies-${{ runner.os }}-${{ env.cache-version }}-
npm-dependencies-${{ runner.os }}-
- name: "Install NPM dependencies"
run: |
npm ci
- name: "Run tests"
run: |
npm run test:frontend
- name: "Upload coverage results"
uses: codecov/[email protected]
with:
flags: frontend

frontend-test-playwright:
name: "Frontend test playwright"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/[email protected]
Expand Down Expand Up @@ -167,7 +137,12 @@ jobs:
- name: "Run tests"
run: |
npm run _test:frontend-playwright
npm run test:frontend
- name: "Upload coverage results"
uses: codecov/[email protected]
with:
flags: frontend

- uses: actions/upload-artifact@v3
if: always()
Expand Down
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,7 @@
"lint": "run-s -c lint:*",
"start": "webpack serve -c test.frontend.webpack.config.js --mode development --no-client-overlay",
"test:backend": "jest",
"test:frontend:serve": "npm run start",
"test:frontend:cypress": "cypress run",
"test:frontend": "start-server-and-test test:frontend:serve http-get://localhost:8080 test:frontend:cypress",
"_test:frontend-playwright": "playwright test",
"test:frontend": "playwright test",
"test": "run-p -c test:*"
}
}

0 comments on commit 31d8767

Please sign in to comment.