-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.08 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
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"
cache: true
cache-dependency-path: ./server/packages.lock.json
- run: pnpm i
- name: Lint client
run: pnpm lint
working-directory: ./client
- name: Build client
run: pnpm client:build
- name: Build server
run: pnpm server:build
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build docker
run: pnpm docker:build
- name: Push docker
run: pnpm docker:push
if: github.ref == 'refs/heads/main'