fix: 🧩 1 #4
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
name: Demo | |
on: | |
push: | |
branches: | |
- master | |
- next | |
pull_request: | |
branches: | |
- master | |
- next | |
merge_group: {} | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: pnpm | |
- name: Setup | |
run: npm i -g @antfu/ni | |
- name: Install | |
run: nci | |
- name: Lint | |
run: nr lint | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [16.x, 18.x, 20.x] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
- name: Set node version to ${{ matrix.node }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: pnpm | |
- name: Setup | |
run: npm i -g @antfu/ni | |
- name: Install | |
run: nci | |
- name: Check QA Pass label | |
if: | | |
! ( | |
contains(github.event.pull_request.labels.*.name, 'QA Passed') || | |
contains(github.event.pull_request.labels.*.name, 'QA Pass expected') | |
) | |
run: | | |
echo "Needs 'QA passed' label for all except revert, test or chore PRs." | |
echo "chore PR is reserved for changes that don't change production." | |
echo "QA should check refactor or gated feature don't alter behavior." | |
exit 1; |