diff --git a/.github/workflows/schematic-schema-convert.yml b/.github/workflows/schematic-schema-convert.yml index ca794ef..74c9ddd 100644 --- a/.github/workflows/schematic-schema-convert.yml +++ b/.github/workflows/schematic-schema-convert.yml @@ -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