-
Notifications
You must be signed in to change notification settings - Fork 0
123 lines (110 loc) · 3.11 KB
/
ci.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
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Build and push Docker image
on:
push:
branches:
- "**"
tags:
- "view-builder-app/v*.*.*"
jobs:
Build:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --openssl-legacy-provider
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: yarn install --frozen-lockfile
- run: yarn build
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: yarn install --frozen-lockfile
- run: yarn test
- name: Codecov
uses: codecov/codecov-action@v3
test-publishing-pipeline:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: docker-practice/[email protected]
with:
docker_version: 20.10.8
- run: yarn
- uses: tpluscode/[email protected]
- run: yarn bootstrap
- run: yarn test
working-directory: ./packages/publish-views
- name: logs on fail
if: ${{ failure() }}
run: lando logs
Test-API:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker-practice/[email protected]
with:
docker_version: 20.10.8
- uses: tpluscode/[email protected]
with:
healthcheck: http://view-builder.lndo.site/app
timeout: 30000
- run: yarn bootstrap
- run: lando test-api test/api/**/*.http
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: yarn
- run: yarn lint
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
uses: zazuko/action-docker-meta@main
id: docker_meta
with:
images: ghcr.io/zazuko/ssz-view-builder
include-pipeline-id: true
strip-tag-prefix: view-builder-app/
- name: Build and push Docker images
id: docker_build
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
build-args: |
COMMIT=${{ github.sha }}
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: zazuko
SENTRY_PROJECT: ssz-view-builder
with:
version_prefix: ssz-view-builder@
ignore_empty: true