Skip to content

Commit

Permalink
Update schematic-schema-convert.yml (#100)
Browse files Browse the repository at this point in the history
anngvu authored Jul 26, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent d4adb26 commit bdcd776
Showing 1 changed file with 33 additions and 18 deletions.
51 changes: 33 additions & 18 deletions .github/workflows/schematic-schema-convert.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,51 @@
# Build JSON-LD on pull requests with data model changes (starts with 'dm/')

name: schematic-schema-convert
name: main-ci

on:

pull_request: # default types: opened, synchronize, reopened
branches: [main]
paths:
- 'modules/**'

- '.github/workflows/main-ci.yml'

workflow_dispatch:

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

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

steps:
- name: Install System Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libcurl4-openssl-dev
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository

- name: Convert schema

- name: Get skip flags
id: check_skip_flags
run: echo "HEAD_COMMIT_MESSAGE=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT"

- name: Setup custom build tools and make jsonld
shell: bash
run: |
bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)
git clone --depth 1 https://github.com/anngvu/retold.git
make
# Set up supported python.
- uses: actions/setup-python@v5
with:
python-version: '3.10.12'

- name: Setup schematic and do another convert pass
id: schematic-convert
run: |
pip install schematicpy==${{ env.SCHEMATIC_VERSION }}
pip show schematicpy
schematic schema convert GF.jsonld
- name: Commit files
run: |
@@ -56,19 +68,22 @@ jobs:
SCHEMATIC_SERVICE_ACCT_CREDS: ${{ secrets.SCHEMATIC_SERVICE_ACCT_CREDS }}
permissions:
pull-requests: write
strategy:
matrix:
schematic-version: [23.9.1]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 1

- uses: actions/setup-python@v5
with:
python-version: '3.10.12'

- name: Setup schematic
id: setup-schematic
run: pip3 install schematicpy==${{ matrix.schematic-version }}
run: |
pip install schematicpy==${{ env.SCHEMATIC_VERSION }}
pip show schematicpy
- name: Test generate googlesheets
working-directory: tests/generate

0 comments on commit bdcd776

Please sign in to comment.