-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (51 loc) · 1.71 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
name: Tests and Checks
on:
pull_request:
branches:
- master
jobs:
build-check:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Build local ANT image
run: docker build -f Dockerfile.ApacheAnt -t apache-ant .
- name: Create VOSpace Java build with ANT
run: docker run --name java-build -v ./java:/app apache-ant dist
- name: Make sure ANT finished successfully
run: docker wait java-build
unit-tests:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Build local ANT image
run: docker build -f Dockerfile.ApacheAnt -t apache-ant .
- name: Create Java build with ANT
run: docker run --rm -v ./java:/app apache-ant dist
- name: Create .env file
run: cp .env.example .env
- name: Create storage user
run: |
sudo groupadd --force -g "1001" "example_group" && \
sudo useradd --non-unique -m -u "1001" -g "example_group" "example_owner"
- name: Update storage permissions
run: sudo chown -R example_owner:example_group ./fixtures/vosdata/
- name: Build VOSpace image
run: docker compose -f compose.dev.yml up -d --build
- name: Wait for VOSpace to come online
run: |
curl \
--fail \
--connect-timeout 10 \
--retry 3 \
--retry-delay 5 \
--retry-max-time 40 \
--retry-all-errors \
-o /dev/null \
http://localhost:8002/vospace-2.0/vospace/
- name: Seed database
run: sleep 5s && scripts/dev/seed_test_data.sh .env
- name: Run Python test suite
run: PUBLISH_PORT=8002 python3 -m unittest testing/test_vospace.py