1
- # Build JSON-LD on pull requests with data model changes (starts with 'dm/')
2
-
3
- name : schematic-schema-convert
1
+ name : main-ci
4
2
5
3
on :
4
+
6
5
pull_request : # default types: opened, synchronize, reopened
7
6
branches : [main]
8
7
paths :
9
8
- ' modules/**'
10
-
9
+ - ' .github/workflows/main-ci.yml'
10
+
11
11
workflow_dispatch :
12
12
13
+ env :
14
+ SCHEMATIC_VERSION : 24.7.2 # please update .devcontainer as well until this can be set globally somewhere...
13
15
14
16
jobs :
15
17
build :
16
- # if: startsWith(github.head_ref, 'dm/')
17
18
runs-on : ubuntu-latest
18
19
19
20
steps :
20
- - name : Install System Dependencies
21
- run : |
22
- sudo apt-get update
23
- sudo apt-get install -y libcurl4-openssl-dev
24
-
25
- - uses : actions/checkout@v3
21
+ - uses : actions/checkout@v4
26
22
with :
27
23
ref : ${{ github.event.pull_request.head.ref }}
28
24
persist-credentials : false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
29
25
fetch-depth : 0 # otherwise, there would be errors pushing refs to the destination repository
30
-
31
- - name : Convert schema
26
+
27
+ - name : Get skip flags
28
+ id : check_skip_flags
29
+ run : echo "HEAD_COMMIT_MESSAGE=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT"
30
+
31
+ - name : Setup custom build tools and make jsonld
32
32
shell : bash
33
33
run : |
34
34
bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)
35
35
git clone --depth 1 https://github.com/anngvu/retold.git
36
36
make
37
+
38
+ # Set up supported python.
39
+ - uses : actions/setup-python@v5
40
+ with :
41
+ python-version : ' 3.10.12'
42
+
43
+ - name : Setup schematic and do another convert pass
44
+ id : schematic-convert
45
+ run : |
46
+ pip install schematicpy==${{ env.SCHEMATIC_VERSION }}
47
+ pip show schematicpy
48
+ schematic schema convert GF.jsonld
37
49
38
50
- name : Commit files
39
51
run : |
@@ -56,19 +68,22 @@ jobs:
56
68
SCHEMATIC_SERVICE_ACCT_CREDS : ${{ secrets.SCHEMATIC_SERVICE_ACCT_CREDS }}
57
69
permissions :
58
70
pull-requests : write
59
- strategy :
60
- matrix :
61
- schematic-version : [23.9.1]
62
71
63
72
steps :
64
- - uses : actions/checkout@v3
73
+ - uses : actions/checkout@v4
65
74
with :
66
75
ref : ${{ github.event.pull_request.head.ref }}
67
76
fetch-depth : 1
68
77
78
+ - uses : actions/setup-python@v5
79
+ with :
80
+ python-version : ' 3.10.12'
81
+
69
82
- name : Setup schematic
70
83
id : setup-schematic
71
- run : pip3 install schematicpy==${{ matrix.schematic-version }}
84
+ run : |
85
+ pip install schematicpy==${{ env.SCHEMATIC_VERSION }}
86
+ pip show schematicpy
72
87
73
88
- name : Test generate googlesheets
74
89
working-directory : tests/generate
0 commit comments