forked from ConsenSys-archive/truffle
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (77 loc) · 2.4 KB
/
Copy pathnodejs.yml
File metadata and controls
88 lines (77 loc) · 2.4 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Node CI
on:
push:
branches:
# long-lived branches
- master
- develop
- next
pull_request:
branches:
- "*"
permissions:
contents: read
jobs:
yarncheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install -g yarn
- run: yarn install --ignore-scripts --ignore-engines
- run: test -z "$(git diff)" || (echo 'Please run yarn and commit all changes to yarn.lock'; false)
- uses: 8398a7/action-slack@v3
with:
channel: '#truffle-ci-notifications'
status: ${{ job.status }}
fields: job,commit,author,pullRequest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
build:
needs: yarncheck
strategy:
matrix:
platform: [ubuntu-latest]
node-version: [14.x, 16.x, 18.x]
env: [GETH=true, PACKAGES=true, INTEGRATION=true]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g yarn
- run: yarn bootstrap
- run: test -z "$(git diff)" || (echo 'Did you check in a generated file to source control? Please remove it if so'; false)
- run: yarn depcheck
- run: ${{ matrix.env }} yarn ci
env:
CI: true
- uses: 8398a7/action-slack@v3
with:
channel: '#truffle-ci-notifications'
status: ${{ job.status }}
fields: job,commit,author,pullRequest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MATRIX_CONTEXT: ${{ toJson(matrix) }} # required for matrix field: job
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure()
slack_notification:
needs: [yarncheck, build]
runs-on: ubuntu-latest
steps:
- uses: 8398a7/action-slack@v3
with:
channel: '#truffle-ci-notifications'
status: success
fields: commit,author,pullRequest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: github.event_name == 'pull_request' && !github.event.pull_request.head.repo.fork