-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.35 KB
/
build-and-test.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
name: Build and Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm
- uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.x"
- run: pnpm i
- name: Build server
run: pnpm server:build
- name: Run Integration Tests
run: pnpm test:integration
- name: Lint client
run: pnpm lint
working-directory: ./src/client
- name: Build client
run: pnpm client:build
- name: Build docker
run: pnpm docker:build
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: github.ref == 'refs/heads/main'
- name: Push docker
id: push_docker
run: pnpm docker:push
if: github.ref == 'refs/heads/main'
- name: Push Watchtower
id: push_watchtower
run: 'curl -H "Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}" "${{ secrets.WATCHTOWER_URL }}"'
if: github.ref == 'refs/heads/main'