-
-
Notifications
You must be signed in to change notification settings - Fork 4
69 lines (54 loc) · 1.75 KB
/
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
name: 🧪 Test and build Docker image
on:
push:
branches:
- master
paths-ignore:
- 'website/**'
- '.github/workflows/website.yml'
pull_request:
branches:
- master
workflow_dispatch:
jobs:
docker-tests:
name: Docker
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "build dockerfile"
run: docker build -f .docker/Dockerfile --tag opengisch/signalo:unstable .
- name: "initialize container"
run: |
docker run -d -p 5432:5432 --name signalo opengisch/signalo:unstable
docker exec signalo init_db.sh wait
docker exec -e PGSERVICE=pg_signalo_demo signalo init_db.sh build -d
docker exec -e PGSERVICE=pg_signalo_demo signalo /src/scripts/all-signs.py
# - uses: actions/setup-node@v3
# with:
# node-version: '18'
- name: "test data model"
run: docker exec signalo pytest
- name: "test images"
run: docker exec signalo /src/test/official_sign_images.sh
- name: "test changelog"
run: docker exec signalo /src/test/test-changelog.sh
# - name: "schema lint"
# run: |
# npm i --no-fund -g schemalint
# cp .schemalintrc.js.template .schemalintrc.js
# schemalint
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: "push to dockerhub"
if: github.event_name != 'pull_request'
run: |
docker push opengisch/signalo:unstable
- name: "failure logs"
if: failure()
run: |
docker logs signalo