-
Notifications
You must be signed in to change notification settings - Fork 3
72 lines (68 loc) · 2.04 KB
/
sapporo.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
name: Sapporo CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
test:
timeout-minutes: 10
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14.6
env:
POSTGRES_DB: irida_next_test
POSTGRES_PASSWORD: test
POSTGRES_USER: test
POSTGRES_HOST: postgres
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Set up PNPM
uses: pnpm/action-setup@v4
with:
version: 9
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Download Sapporo
uses: actions/checkout@v3
with:
repository: phac-nml/sapporo-service
ref: irida-next
path: ./sapporo
- name: Build Sapporo
run: |
cd sapporo
IRIDA_NEXT_PATH=${GITHUB_WORKSPACE}/tmp MYUID="$(id -u)" MYGID="$(id -g)" docker compose -f compose.irida-next.yml up -d --build
cd ..
- name: Run Sapporo
uses: JarvusInnovations/background-action@v1
with:
run: |
IRIDA_NEXT_PATH=${GITHUB_WORKSPACE}/tmp MYUID="$(id -u)" MYGID="$(id -g)" docker compose -f compose.irida-next.yml exec app bash -c "sapporo"
wait-on: http-get://localhost:1122/service-info
wait-for: 2m
working-directory: sapporo
- name: Update permissions
run: sudo chmod -R 777 ${GITHUB_WORKSPACE}
- name: Run tests
run: |
bin/rails test test/integration/sapporo.rb