Merge branch 'testing-204-meal-repository-contract-solution' into tes⦠#1870
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: | |
env: | |
# Using Nx Cloud is safer | |
NX_REJECT_UNKNOWN_LOCAL_CACHE: 0 | |
jobs: | |
build: | |
name: π¦ Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- run: pnpm nx run-many --parallel=4 -t build | |
lint: | |
name: π§Ή Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- run: pnpm nx run-many --parallel=4 -t lint | |
test: | |
name: β Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- run: pnpm nx run-many --parallel=4 -t test,vitest --pass-with-no-tests | |
playwright-ct: | |
name: π Playwright CT | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Playwright browsers install | |
run: pnpm playwright install --with-deps | |
- run: pnpm nx run-many --parallel=4 -t test-ui --pass-with-no-tests | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: π Playwright Report | |
path: dist/.playwright | |
retention-days: 7 | |
cypress-ct: | |
name: Cypress CT | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup | |
uses: ./.github/actions/setup | |
# Skip Cypress Component tests on branches that don't have them | |
# this avoids no specs error and polluting the code base | |
# with some cypress test file from the beginning. | |
- name: Has Cypress tests | |
id: has-cypress-tests | |
run: | | |
if [ $(find apps libs -name '*.cy.ts' | wc -l) -gt 0 ]; then | |
echo "has-cypress-tests=true" >> $GITHUB_OUTPUT | |
else | |
echo "has-cypress-tests=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Cypress component tests | |
if: steps.has-cypress-tests.outputs.has-cypress-tests == 'true' | |
run: pnpm nx run-many --parallel=4 -t test-ui-cypress |