Skip to content

Commit bdcd776

Browse files
authored
Update schematic-schema-convert.yml (#100)
1 parent d4adb26 commit bdcd776

File tree

1 file changed

+33
-18
lines changed

1 file changed

+33
-18
lines changed

.github/workflows/schematic-schema-convert.yml

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,51 @@
1-
# Build JSON-LD on pull requests with data model changes (starts with 'dm/')
2-
3-
name: schematic-schema-convert
1+
name: main-ci
42

53
on:
4+
65
pull_request: # default types: opened, synchronize, reopened
76
branches: [main]
87
paths:
98
- 'modules/**'
10-
9+
- '.github/workflows/main-ci.yml'
10+
1111
workflow_dispatch:
1212

13+
env:
14+
SCHEMATIC_VERSION: 24.7.2 # please update .devcontainer as well until this can be set globally somewhere...
1315

1416
jobs:
1517
build:
16-
# if: startsWith(github.head_ref, 'dm/')
1718
runs-on: ubuntu-latest
1819

1920
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
2622
with:
2723
ref: ${{ github.event.pull_request.head.ref }}
2824
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
2925
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
3232
shell: bash
3333
run: |
3434
bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)
3535
git clone --depth 1 https://github.com/anngvu/retold.git
3636
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
3749
3850
- name: Commit files
3951
run: |
@@ -56,19 +68,22 @@ jobs:
5668
SCHEMATIC_SERVICE_ACCT_CREDS: ${{ secrets.SCHEMATIC_SERVICE_ACCT_CREDS }}
5769
permissions:
5870
pull-requests: write
59-
strategy:
60-
matrix:
61-
schematic-version: [23.9.1]
6271

6372
steps:
64-
- uses: actions/checkout@v3
73+
- uses: actions/checkout@v4
6574
with:
6675
ref: ${{ github.event.pull_request.head.ref }}
6776
fetch-depth: 1
6877

78+
- uses: actions/setup-python@v5
79+
with:
80+
python-version: '3.10.12'
81+
6982
- name: Setup schematic
7083
id: setup-schematic
71-
run: pip3 install schematicpy==${{ matrix.schematic-version }}
84+
run: |
85+
pip install schematicpy==${{ env.SCHEMATIC_VERSION }}
86+
pip show schematicpy
7287
7388
- name: Test generate googlesheets
7489
working-directory: tests/generate

0 commit comments

Comments
 (0)