Update ci.yml #18
Workflow file for this run
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
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
name: π§ͺ Continuous Integration | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: π₯ Checkout | |
uses: actions/checkout@v3 | |
- name: π Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: π Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
run_install: false | |
- name: ποΈ Install Dependencies | |
run: | | |
pnpm install | |
- name: π Start Frontend and Backend | |
run: | | |
docker pull ghcr.io/simplytest/banking-backend:latest | |
docker run -d -p 5005:5005 -e "SIMPLYTEST_DEMO=ON" --rm --name=Banking-Backend-Demo ghcr.io/simplytest/banking-backend:latest | |
pnpm run start & | |
- name: β Wait for Frontend | |
uses: iFaxity/[email protected] | |
with: | |
resource: http://localhost:4200 | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- uses: sonarsource/sonarqube-scan-action@master | |
env: | |
SONAR_TOKEN: ${{ secrets.SONARQUBE_TOKEN }} | |
SONAR_HOST_URL: ${{ secrets.SONARQUBE_HOST }} | |
- name: π§ͺ Integration Tests | |
run: | | |
pnpm run test:int | |
- name: π§ͺ End To End Tests | |
run: | | |
pnpm run test:e2e | |
- name: π Check for duplicate reports | |
id: skip_check | |
uses: fkirc/skip-duplicate-actions@v5 | |
with: | |
skip_after_successful_duplicate: true | |
concurrent_skipping: "same_content_newer" | |
- name: π E2E Test Report | |
uses: phoenix-actions/test-reporting@v8 | |
if: steps.skip_check.outputs.should_skip != 'true' && (success() || failure()) | |
with: | |
name: π E2E Test Report | |
reporter: java-junit | |
path: "results/e2e*.xml" | |
- name: π Integration Test Report | |
uses: phoenix-actions/test-reporting@v8 | |
if: steps.skip_check.outputs.should_skip != 'true' && (success() || failure()) | |
with: | |
name: π Integration Test Report | |
reporter: java-junit | |
path: "results/integration*.xml" |