Update sex.csv with 'missing or unknown' value for edge cases #155
Workflow file for this run
This file contains 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
# This workflow is used to convert changed AD.model.csv to AD.model.jsonld | |
# and push the updated jsonld to feature branch. It also generates a test report | |
# on any changed manifests, with links to manifests. | |
name: CI | |
on: | |
pull_request: | |
branches: main | |
# runs on changes to module csvs | |
paths: 'modules/**' | |
workflow_dispatch: | |
jobs: | |
CI: | |
name: schema-convert | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
SCHEMATIC_SERVICE_ACCOUNT_CREDS: ${{ secrets.SCHEMATIC_SERVICE_ACCOUNT_CREDS }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Install Libraries | |
shell: bash | |
run: 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 | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "[email protected]" | |
git add AD.model.csv | |
git commit -m "GitHub Action: assemble *.model.csv from modules directory" || echo "No changes to commit" | |
- name: Convert .csv to .jsonld | |
shell: bash | |
run: schematic schema convert AD.model.csv | |
- name: Commit JSON-LD changes | |
run: | | |
git config --local user.name "$GITHUB_ACTOR" | |
git config --local user.email "[email protected]" | |
git add AD.model.jsonld | |
git commit -m "GitHub Action: convert *.model.csv to *.model.jsonld" || echo "No changes to commit" | |
- name: Push csv and json-ld model changes | |
uses: r-lib/actions/pr-push@v2 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Identify changed manifests | |
working-directory: tests | |
run: ./changed_manifest_selection.sh | |
- name: Generate test manifests | |
working-directory: tests | |
continue-on-error: true | |
run: ./generate_test_manifests.sh | |
- name: Create test suite report | |
working-directory: tests | |
continue-on-error: true | |
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 | |
allow-repeats: true | |
- name: Upload test artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-logs | |
path: tests |