72 lines (60 loc) · 1.84 KB
/
continuous-integration.yaml
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
name: Continuous Integration
on:
pull_request:
branches: [ "master" ]
push:
branches: [ "master" ]
tags: [ "*.*.*" ]
jobs:
build_and_test:
strategy:
matrix:
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- name: 📥 Checkout repository
uses: actions/checkout@v2.3.3
with:
submodules: true
- name: 🧰 Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14.17
- name: ↪ Set package version
id: package-version
uses: martinbeentjes/npm-get-version-action@master
with:
path: .
- name: 🔨 Build
run: |
yarn install --frozen-lockfile --non-interactive --logevel=error
yarn build
yarn lint
- name: Docker Build - http-server
run: |
docker build --target http-server -t cardano-services-http-server:${{ github.sha }} .
- name: 🔬 Test
run: |
yarn test
yarn test:build:verify
- name: 📦 Pack
run: |
./scripts/pack.sh
- name: 📤 Upload npm packages
uses: actions/upload-artifact@v3
with:
name: cardano-js-sdk-packages
path: ./cardano-sdk-*-${{ steps.package-version.outputs.current-version}}.tgz
- name: 📦 Package Golden Test Generator
working-directory: packages/golden-test-generator
run: yarn pkg
- name: 📤 Upload Golden Test Generator exe - Linux
uses: actions/upload-artifact@v3
with:
name: golden-test-generator-linux
path: ./packages/golden-test-generator/build/golden-test-generator-linux
- name: 📤 Upload Golden Test Generator exe - macOS
uses: actions/upload-artifact@v3
with:
name: golden-test-generator-macos
path: ./packages/golden-test-generator/build/golden-test-generator-macos