Skip to content

Commit 4c83a05

Browse files
committed
fix actions test
1 parent 57bc149 commit 4c83a05

2 files changed

Lines changed: 23 additions & 34 deletions

File tree

.github/workflows/nim.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: Build and test Nim
22

33
# テストはPRだけ
4-
on: [pull_request]
4+
on:
5+
pull_request:
6+
paths-ignore:
7+
- '*.md'
8+
- 'documents/*'
59

610
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
711
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -23,25 +27,25 @@ jobs:
2327
steps:
2428
- run: echo "no WIP"
2529

26-
test-on-docker-nim-v1:
30+
test-on-docker-nim:
2731
runs-on: ubuntu-latest
2832
needs: before
33+
strategy:
34+
fail-fast: false
35+
matrix:
36+
nim-version:
37+
- 2.0.16
38+
- 2.2.8
39+
env:
40+
NIM_VERSION: ${{ matrix.nim-version }}
2941
steps:
30-
- uses: actions/checkout@v2
31-
- name: Build docker image
32-
run: docker compose -f compose.test.yaml build app-ubuntu-v1
33-
- name: Test
34-
run: docker compose -f compose.test.yaml run app-ubuntu-v1 nimble test
35-
36-
test-on-docker-nim-v2:
37-
runs-on: ubuntu-latest
38-
needs: before
39-
steps:
40-
- uses: actions/checkout@v2
41-
- name: Build docker image
42-
run: docker compose -f compose.test.yaml build app-ubuntu-v2
43-
- name: Test
44-
run: docker compose -f compose.test.yaml run app-ubuntu-v2 nimble test
42+
- uses: actions/checkout@v2
43+
- name: Build docker image
44+
run: docker compose -f compose.test.yaml build app
45+
- name: Start dependencies
46+
run: docker compose -f compose.test.yaml up -d postgres mysql mariadb surreal
47+
- name: Test
48+
run: docker compose -f compose.test.yaml run --rm --no-deps app nimble test
4549

4650

4751
# アプリケーションの方を使うことにした

compose.test.yaml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,10 @@
11
services:
2-
app-ubuntu-v1:
2+
app:
33
build:
44
context: .
55
dockerfile: ./docker/ubuntu/test.Dockerfile
66
args:
7-
NIM_VERSION: 1.6.20
8-
tty: true
9-
volumes:
10-
- .:/root/project
11-
depends_on:
12-
- postgres
13-
- mysql
14-
- mariadb
15-
- surreal
16-
17-
app-ubuntu-v2:
18-
build:
19-
context: .
20-
dockerfile: ./docker/ubuntu/test.Dockerfile
21-
args:
22-
NIM_VERSION: 2.2.0
7+
NIM_VERSION: "${NIM_VERSION:-2.2.8}"
238
tty: true
249
volumes:
2510
- .:/root/project

0 commit comments

Comments
 (0)