-
-
Notifications
You must be signed in to change notification settings - Fork 36
54 lines (54 loc) · 1.63 KB
/
push.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
43
44
45
46
47
48
49
50
51
52
53
54
name: Continuous Integration
on: push
jobs:
unit-tests:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-22.04
node-version: [ 18.x, 20.x, 22.x ]
go-version:
- 1.16.x
steps:
- uses: actions/checkout@v4
- name: 'Install Golang ${{ matrix.go-version }}'
uses: actions/setup-go@v2
with:
go-version: '${{ matrix.go-version }}'
- name: Run Go unit tests
run: go test ./...
- name: 'Install node.js ${{ matrix.node-version }}'
uses: actions/setup-node@v4
with:
node-version: '${{ matrix.node-version }}'
- name: Install npm dependencies
run: npm install
- name: Run JS unit tests
run: npm test
- name: Run JS end-to-end tests
run: npm run end-to-end
npm-publish:
needs: unit-tests
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: 'Install Golang 1.16.x'
uses: actions/setup-go@v2
with:
go-version: '1.16.x'
- name: 'Install node.js 16.x'
uses: actions/setup-node@v4
with:
node-version: '16.x'
- name: Install npm dependencies
run: npm install
- name: Run semantic-release
env:
GH_TOKEN: ${{ secrets.GH_SEMANTIC_RELEASE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: >
if [[ -n "$GH_TOKEN" && -n "$NPM_TOKEN" ]]; then
curl "https://raw.githubusercontent.com/pelias/ci-tools/master/semantic-release.sh" | bash -
fi