generated from Game-as-a-Service/Gaas-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (58 loc) · 1.3 KB
/
main.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: Main
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
subdir: [server, frontend]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install package
run: |
cd ${{ matrix.subdir }}
yarn
- name: Run lint
run: |
cd ${{ matrix.subdir }}
yarn lint-check
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
subdir: [server, frontend]
mongodb-version: ['6.0']
env:
DB_CONN_STRING: localhost
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: Install package
run: |
cd ${{ matrix.subdir }}
yarn
- name: Run test
run: |
cd ${{ matrix.subdir }}
yarn test
build:
needs: [lint, test]
strategy:
fail-fast: false
matrix:
subdir: [server, frontend]
uses: ./.github/workflows/docker-publish.yml
with:
subdir: ${{ matrix.subdir }}