-
Notifications
You must be signed in to change notification settings - Fork 80
75 lines (71 loc) · 2.19 KB
/
builds.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
name: Build
on:
push:
branches:
- master
- v1.*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
# the python version to release the ontology with.
# Must be a version in the matrix.python-version list
RELEASE_PYTHON_VERSION: '3.10'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10']
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Set up AllegroGraph (Docker)
run: |
docker version
docker pull franzinc/agraph:v7.1.0
- name: Install Dependencies
run: |
pip install -r requirements.txt
pip freeze
- name: Generate new Brick ontology
# generate new Brick ontology (in case this hasn't been run)
run: |
make
cat Brick.ttl
- name: zip imports and extensions
run: |
zip -r imports.zip imports
zip -r extensions.zip extensions
- name: upload ttls
id: upload-ttls
if: ${{ matrix.python-version == env.RELEASE_PYTHON_VERSION }}
uses: actions/upload-artifact@v4
with:
name: Brick-ontology
path: |
Brick.ttl
Brick+imports.ttl
Brick+extensions.ttl
Brick-only.ttl
imports.zip
extensions.zip
- name: comment artifact
# if the trigger is on a pull request
if: ${{ github.event_name == 'pull_request' && matrix.python-version == env.RELEASE_PYTHON_VERSION }}
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.number }}
# in the body, make a markdown link to the steps.upload-ttls.output.artifact-url
body: |
The latest build of the Brick ontology on this PR is available [here](${{ steps.upload-ttls.outputs.artifact-url }}).
- name: Run the tests
# -s flag: do not capture output (avoids killing test after 10 min)
run: |
pytest -s -vvvv --durations=0 -n auto tests