-
Notifications
You must be signed in to change notification settings - Fork 161
42 lines (35 loc) · 1 KB
/
tests.yml
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
name: GitHub Actions CI
on:
push:
branches:
- main
pull_request:
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v1
- name: Set up Ruby
uses: ruby/setup-ruby@v1
- name: Get NodeJS version
run: echo "::set-output name=NODE_VERSION::$(cat .node-version)"
id: node_version
- name: Set up NodeJS
uses: actions/setup-node@v1
with:
node-version: "${{ steps.node_version.outputs.NODE_VERSION }}"
- name: Bootstrap
run: script/bootstrap
- name: Check for uncommitted or incorrect NodeJS modules
run: |
git diff --stat --exit-code node_modules || {
echo '\n\nError: you must commit all NodeJS modules!'
exit 1
}
grep -qr alt-h0 node_modules || {
echo 'Error: Primer NodeJS modules must contain alt-h0!'
exit 1
}
- name: Run tests
run: script/test