Update nucleiEnrichmentProtocol.csv with new entry WIP #302
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - synchronize | |
| - labeled | |
| branches: | |
| - 'main' | |
| paths: | |
| - 'modules/**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.triggering_actor }} | |
| cancel-in-progress: true | |
| jobs: | |
| schema-convert: | |
| runs-on: ubuntu-latest | |
| if: github.triggering_actor != 'commit-to-main-bot-adkp[bot]' | |
| outputs: | |
| CHANGED_MANIFESTS: ${{ steps.identify-changed-manifests.outputs.changed_manifests }} | |
| steps: | |
| - uses: actions/create-github-app-token@v2 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.COMMIT_BOT_ID }} | |
| private-key: ${{ secrets.COMMIT_BOT_KEY }} | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.app-token.outputs.token }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: install libraries | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: list changed attributes for manifest testing | |
| run: git diff --name-only origin/main HEAD > ./tests/changed-files.txt | |
| - name: assemble csv data model | |
| run: python scripts/assemble_csv_data_model.py modules AD.model.csv | |
| - name: commit csv changes | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| default_author: github_actions | |
| add: 'AD.model.csv' | |
| message: "assemble *.model.csv from modules directory" | |
| push: true | |
| - name: convert .csv to .jsonld | |
| shell: bash | |
| run: schematic schema convert AD.model.csv | |
| - name: Commit JSON-LD changes | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| default_author: github_actions | |
| add: "AD.model.jsonld" | |
| message: "convert *.model.csv to *.model.jsonld" | |
| push: true | |
| - name: Identify changed manifests | |
| working-directory: tests | |
| run: ./changed_manifest_selection.sh | |
| - name: Save changed manifests | |
| id: identify-changed-manifests | |
| working-directory: tests | |
| shell: bash | |
| run: | | |
| changed_manifests=$( jq -r '.[] | .schema_name' changed-templates.json ) | |
| echo "CHANGED_MANIFESTS="$changed_manifests"" >> "$GITHUB_OUTPUT" | |
| - name: Delay start of subsequent jobs | |
| shell: bash | |
| run: | | |
| echo "Delaying start of subsequent jobs" | |
| for i in $(seq 1 60); do | |
| sleep 1 | |
| printf "$i of 60 seconds\r" | |
| done | |
| test: | |
| if: github.event.action != 'labeled' | |
| runs-on: ubuntu-latest | |
| needs: [schema-convert] | |
| env: | |
| SCHEMATIC_SERVICE_ACCOUNT_CREDS: ${{ secrets.SCHEMATIC_SERVICE_ACCOUNT_CREDS }} | |
| steps: | |
| - env: | |
| CHANGED_MANIFESTS: ${{ needs.schema-convert.outputs.CHANGED_MANIFESTS }} | |
| run: | |
| echo "$CHANGED_MANIFESTS" | |
| - uses: actions/create-github-app-token@v2 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.COMMIT_BOT_ID }} | |
| private-key: ${{ secrets.COMMIT_BOT_KEY }} | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.app-token.outputs.token }} | |
| clean: false | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install libraries | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Generate test manifests | |
| working-directory: tests | |
| run: bash ./generate_test_manifests.sh "${{ needs.schema-convert.outputs.CHANGED_MANIFESTS }}" | |
| - name: Create Test Suite Report | |
| working-directory: tests | |
| run: docker run -v $(pwd):/tests rocker/tidyverse R -e "rmarkdown::render('tests/test-suite-report.Rmd')" | |
| - name: Report on test suite as pr comment | |
| uses: mshick/add-pr-comment@v2 | |
| with: | |
| message-id: test-suite-report | |
| message-path: | | |
| tests/test-suite-report.md | |
| - name: Upload test artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-logs | |
| path: tests | |
| merge: | |
| needs: [schema-convert] | |
| if: contains(github.event.pull_request.labels.*.name, 'automerge') && github.event.action != 'opened' && github.event.action != 'synchronize' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/create-github-app-token@v2 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.COMMIT_BOT_ID }} | |
| private-key: ${{ secrets.COMMIT_BOT_KEY }} | |
| - id: merge-and-delete | |
| uses: "pascalgn/automerge-action@v0.16.4" | |
| env: | |
| GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} | |
| MERGE_LABELS: "automerge" | |
| MERGE_DELETE_BRANCH: "true" | |
| MERGE_METHOD: "squash" | |
| BASE_BRANCHES: "main" | |
| MERGE_ERROR_FAIL: "true" | |
| generate-and-upload-manifests: | |
| needs: [schema-convert, merge] | |
| if: contains(github.event.pull_request.labels.*.name, 'automerge') | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| SCHEMATIC_SERVICE_ACCOUNT_CREDS: ${{ secrets.SCHEMATIC_SERVICE_ACCOUNT_CREDS }} | |
| SYNAPSE_AUTH_TOKEN: ${{ secrets.SYNAPSE_TOKEN_DPE }} | |
| SYNAPSE_UPLOAD_FOLDER_ID: syn25878249 | |
| steps: | |
| - env: | |
| CHANGED_MANIFESTS: ${{ needs.schema-convert.outputs.CHANGED_MANIFESTS }} | |
| run: | |
| echo "$CHANGED_MANIFESTS" | |
| - uses: actions/create-github-app-token@v2 | |
| id: app-token | |
| with: | |
| app-id: ${{ vars.COMMIT_BOT_ID }} | |
| private-key: ${{ secrets.COMMIT_BOT_KEY }} | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ steps.app-token.outputs.token }} | |
| clean: false | |
| ref: 'refs/heads/main' | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install libraries | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Generate changed manifests | |
| working-directory: tests | |
| run: ./generate_changed_templates.sh "${{ needs.schema-convert.outputs.CHANGED_MANIFESTS }}" | |
| - name: Commit manifests to main | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| default_author: github_actions | |
| add: "current-excel-manifests" | |
| message: "add changed manifests" | |
| push: true | |
| - name: Generate JSONSchema | |
| shell: bash | |
| run: schematic schema generate-jsonschema -dms AD.model.jsonld -od current-manifest-schemas -dml display_label | |
| - name: Commit schemas to main | |
| uses: EndBug/add-and-commit@v9 | |
| with: | |
| default_author: github_actions | |
| add: "current-manifest-schemas" | |
| message: "add schemas" | |
| push: true | |
| - name: Upload manifests to Synapse | |
| working-directory: current-excel-manifests | |
| run: ../tests/upload_templates.sh "${{ needs.schema-convert.outputs.CHANGED_MANIFESTS }}" | |