-
Notifications
You must be signed in to change notification settings - Fork 26
63 lines (51 loc) · 1.4 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
59
60
61
62
63
name: ci
on:
push:
pull_request:
branches:
- master
jobs:
test:
if: github.ref == 'refs/heads/master' && github.repository_owner == 'ia-toki'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 50
- name: Build CMake project
run: cmake . && cmake --build .
- name: Run unit tests
run: ./test_unit
- name: Run integration tests
run: ./test_integration
- name: Run ete tests
run: ./test_ete
- name: Upload code coverage report
run: bash <(curl -s https://codecov.io/bash)
deploy-web:
if: github.ref == 'refs/heads/master' && github.repository_owner == 'ia-toki'
runs-on: ubuntu-latest
env:
HOST: ${{ secrets.HOST }}
KNOWN_HOSTS: ${{ secrets.KNOWN_HOSTS }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Set up node
uses: actions/setup-node@v3
with:
node-version: "20"
- name: Build
run: |
cd web
yarn install
yarn build
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.PRIVATE_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
- name: Rsync
run: rsync -avzh web/build/ root@${HOST}:/var/www/html/tcframe --delete