This repository has been archived by the owner on Feb 20, 2023. It is now read-only.
forked from JellyfishSDK/whale
-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (89 loc) · 2.85 KB
/
ci.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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: '15'
cache: 'npm'
- run: npm ci
- run: npm run build
packages-build:
name: Packages Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: '15'
cache: 'npm'
- run: npm ci
- run: npm run packages:build
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: '15'
cache: 'npm'
- run: npm ci
- run: npm run test:ci
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b
with:
fail_ci_if_error: true
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- uses: actions/setup-node@270253e841af726300e85d718a5f606959b2903c
with:
node-version: '15'
cache: 'npm'
- run: npm ci
- run: npx --no-install ts-standard
docker-buildx:
needs: [ build, lint ]
name: Docker Buildx
runs-on: ubuntu-latest
strategy:
matrix:
platform: [ linux/amd64, linux/arm64 ]
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@27d0a4f181a40b142cce983c5393082c365d1480
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@94ab11c41e45d028884a99163086648e898eed25
- name: Build platforms
uses: docker/build-push-action@a66e35b9cbcf4ad0ea91ffcaf7bbad63ad9e0229
with:
push: false
platforms: ${{ matrix.platform }}
tags: ghcr.io/defich/whale:latest
docker-sanity:
needs: [ build, lint ]
name: Docker Sanity Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1e204e9a9253d643386038d443f96446fa156a97
- name: Setup docker containers
run: docker-compose -f .github/workflows/ci/docker-compose.yml up -d
- name: Wait for
run: .github/workflows/ci/wait-for http://localhost:3000/_actuator/probes/liveness -t 6
- name: Sanity testing
uses: matt-ball/newman-action@0659e9b8d056c0d03d94e1dbfce380512088b566
with:
collection: .github/workflows/ci/postman_collection.json