Update dependency @bahmutov/cy-grep to v2.0.4 (#241) #292
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: ci | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
all-tests: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v3 | |
- name: All E2E tests 🧪 | |
# https://github.com/cypress-io/github-action | |
uses: cypress-io/github-action@v5 | |
with: | |
start: npm run start:ci | |
# quote the url to be safe against YML parsing surprises | |
wait-on: 'http://localhost:8888' | |
# record the results on the Cypress Dashboard | |
# https://on.cypress.io/dashboard-introduction | |
record: true | |
# tags and groups make it simple to find this run | |
# on the Dashboard | |
tag: main | |
group: main | |
# environment variables while running Cypress | |
env: | |
# pass the Dashboard record key as an environment variable | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
# pass GitHub token to allow accurately detecting a build vs a re-run build | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# https://github.com/bahmutov/find-cypress-specs | |
- name: Print test names 🖨 | |
run: npm run print-tests | |
by-title: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v3 | |
- name: Install 📦 | |
# https://github.com/cypress-io/github-action | |
uses: cypress-io/github-action@v5 | |
with: | |
runTests: false | |
- name: Start server 🏁 | |
run: npm run start:ci & | |
# https://github.com/bahmutov/find-cypress-specs | |
- name: Print test names 🖨 | |
run: npm run print-tests | |
# confirm the filtering and skipping tests works as expected | |
# using https://github.com/bahmutov/cypress-expect | |
- name: Run using grep title 🔎 | |
# all specs without the tests are filtered | |
# and all other tests are skipped | |
run: | | |
npx cypress-expect run \ | |
--env grep="update state when items are completed" \ | |
--expect-exactly expected/one.json | |
by-tag: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v3 | |
- name: Install 📦 | |
# https://github.com/cypress-io/github-action | |
uses: cypress-io/github-action@v5 | |
with: | |
runTests: false | |
- name: Stop only 🛑 | |
run: npm run stop-only | |
- name: Start server 🏁 | |
run: npm run start:ci & | |
# https://github.com/bahmutov/find-cypress-specs | |
- name: Print test names 🖨 | |
run: npm run print-tests | |
- name: Run using grep tags 🔎 | |
run: | | |
npx cypress-expect run \ | |
--env grepTags='@misc' \ | |
--expect-exactly expected/tag-misc.json | |
burn-tests: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout 🛎 | |
uses: actions/checkout@v3 | |
- name: Install 📦 | |
# https://github.com/cypress-io/github-action | |
uses: cypress-io/github-action@v5 | |
with: | |
runTests: false | |
- name: Start server 🏁 | |
run: npm run start:ci & | |
# https://github.com/bahmutov/find-cypress-specs | |
- name: Print test names 🖨 | |
run: npm run print-tests | |
- name: Burn tests 🔥 | |
run: | | |
npx cypress-expect run \ | |
--env burn=3 \ | |
--spec cypress/e2e/counter-spec.js \ | |
--expect-exactly expected/burn-counter.json |