Repository navigation
61 lines (55 loc) · 2.24 KB
/
Copy pathtest.yml
File metadata and controls
61 lines (55 loc) · 2.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Test
on:
# Can be called from other workflows
workflow_call:
# Can be run manually
workflow_dispatch:
# on git push
push:
branches:
- dev
# Only one run per branch at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
if: >
github.event_name == 'workflow_dispatch' ||
(
github.event_name == 'push' &&
!(
contains(github.event.head_commit.message, 'no-test') ||
(
startsWith(github.event.head_commit.message, 'Merge pull request') &&
contains(github.event.head_commit.message, '/dev')
)
)
)
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
# Checks out as well, so there is no separate actions/checkout step.
#
# `panates/ghac-setup-node` was the old name of this same repository - GitHub still redirects
# it, which is why it kept working, but the current name is what should be written down.
#
# `rman-version` replaces the `npm install rman -g` step this used to have: that installed
# whatever `latest` happened to be, so the day rman 2.0.0 reached `latest` this job would have
# jumped a major without anything here changing.
- name: 'Setup Environment'
uses: panates/gh-setup-node@v2
with:
node-version: '20.19.2'
# A floating major, matching what node-release.yaml pins for the release path. This was
# briefly an exact `2.0.0-beta.5`: until rman 2.0.0 shipped, `rman@2` did not resolve at
# all - npm's dist-tags were `latest: 2.0.0-beta.3` and `beta: 2.0.0-beta.5`, and a bare
# `2` range does not match a prerelease.
rman-version: '2'
# **`npm run qc`, not `rman run qc`.** Under rman 2 the monorepo root's own script no longer
# counts toward the script being defined - the root contributes only pre/post bookends - so
# `rman run qc` fails with `No package defines a "qc" script.` (measured, exit 1), since `qc`
# is declared in the root package.json alone. npm runs that root script, which is itself
# `rman run lint`, and `lint` *is* declared by the packages.
- name: Run qc tests
run: npm run qc