show example of selecting both js and ts specs #44
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: main | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
# https://github.com/actions/checkout | |
uses: actions/checkout@v4 | |
with: | |
# we need multiple branches | |
# in order to detect Git changes | |
fetch-depth: 0 | |
- uses: bahmutov/npm-install@v1 | |
- name: Run tests | |
run: npm test | |
- name: Demo finding test ids in source files | |
run: npm run demo:sources | |
- name: Demo finding test ids in specs | |
run: npm run demo:specs | |
- name: Demo warning about untested ids | |
run: npm run demo:warn | |
- name: Demo find changed specs for changed test ids | |
run: npm run demo:changed | |
- name: Demo find test ids in changed source files | |
run: npm run demo:changed:ids -- --set-gha-outputs | |
- name: Print specs that use specific test ids | |
run: npm run demo:ids:specs -- --set-gha-outputs | |
release: | |
runs-on: ubuntu-20.04 | |
needs: test | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: bahmutov/npm-install@v1 | |
# https://github.com/cycjimmy/semantic-release-action | |
- name: Semantic Release | |
uses: cycjimmy/semantic-release-action@v3 | |
id: semantic | |
with: | |
branch: main | |
dry_run: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |