-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (65 loc) · 2.18 KB
/
run-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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Run Code
on: [push, repository_dispatch, workflow_dispatch]
jobs:
run-incomplete:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run Incomplete
run: >
docker run --network host
-v /var/run/docker.sock:/var/run/docker.sock
-v $(pwd):$(pwd)
-w $(pwd)
ghcr.io/zcaudate-xyz/infra-foundation-clean:ci lein incomplete
run-tests:
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run Tests
run: >
docker run --network host
-v /var/run/docker.sock:/var/run/docker.sock
-v $(pwd):$(pwd)
-w $(pwd)
ghcr.io/zcaudate-xyz/infra-foundation-clean:ci lein test
services:
postgres:
image: ghcr.io/zcaudate-xyz/infra-db:main
env:
POSTGRES_DB: test
POSTGRES_PASSWORD: postgres
POSTGRES_PORT: 5432
POSTGRES_USER: postgres
ports:
- 5432:5432
build-js-web:
runs-on: ubuntu-latest
timeout-minutes: 3
steps:
- name: Write SSH keys
shell: bash
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.GH_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
ssh-keyscan -H github.com > ~/.ssh/known_hosts
- name: Checkout base repository
uses: actions/checkout@v3
with:
repository: zcaudate/foundation-base
path: foundation-base
token: ${{ secrets.GH_TOKEN }}
- name: Deploying native-code
run: >
docker run --network host
-v /var/run/docker.sock:/var/run/docker.sock
-v $HOME/.ssh:/root/.ssh
-v $(pwd):$(pwd) -w $(pwd)
-e "GITHUB_TOKEN=${{ secrets.GH_TOKEN }}"
-e "GITHUB_USER=${{ secrets.GH_USER }}"
ghcr.io/zcaudate-xyz/infra-foundation-clean:ci
bash -c "cd foundation-base && git config --global --add safe.directory '*' && lein push-native-code"