Mpi benchmarks cleanup #125
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
name: ci-validate-configs | |
on: | |
push: | |
branches: | |
- 'main' | |
paths: | |
- '**.json' | |
- '**.jsonc' | |
- '**.bicep' | |
- '.github/workflows/ci-validate.yaml' | |
pull_request: | |
branches: | |
- 'main' | |
paths: | |
- '**.json' | |
- '**.jsonc' | |
- '**.bicep' | |
- '.github/workflows/ci-validate.yaml' | |
permissions: | |
contents: write | |
jobs: | |
validate: | |
runs-on: ubuntu-22.04 | |
environment: azure | |
steps: | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.8" | |
- name: checkout source | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: validate bicep | |
run: | | |
az --version | |
az bicep build --file $GITHUB_WORKSPACE/modules/infrastructure.bicep | |
file $GITHUB_WORKSPACE/modules/infrastructure.json | |
- name: validate examples bicep | |
run: | | |
find "$GITHUB_WORKSPACE/examples" -type f -name "deployment.bicep" | while read -r file; do | |
# for each file, get parent directory name | |
example_name=$(basename $(dirname "$file")) | |
az bicep build --file "$file" --outfile "$GITHUB_WORKSPACE/templates/${example_name}_deploy.json" | |
done | |
ls -al $GITHUB_WORKSPACE/templates/ | |
- name: Add & Commit generated ARM templates | |
uses: EndBug/add-and-commit@v9.1.3 | |
with: | |
add: 'templates/*.json' | |
author_name: "GitHub Robot" | |
author_email: "github-robot@noreply.com" | |
message: 'Auto-generated ARM templates' | |
push: ${{ github.ref == 'refs/heads/main' }} | |
# - name: Install dependencies | |
# run: | | |
# python3.8 -m pip install --upgrade pip | |
# python3.8 -m pip install ./cli | |
# - name: validate config.template.jsonc | |
# run: | | |
# sb json strip -i $GITHUB_WORKSPACE/config/config.template.jsonc > $GITHUB_WORKSPACE/config/config.json | |
# jsonschema -i $GITHUB_WORKSPACE/config/config.json $GITHUB_WORKSPACE/schemas/config.schema.json | |
# - name: validate hubConfig.template.jsonc | |
# run: | | |
# sb json strip -i $GITHUB_WORKSPACE/config/hubConfig.template.jsonc > $GITHUB_WORKSPACE/config/hubConfig.json | |
# jsonschema -i $GITHUB_WORKSPACE/config/hubConfig.json $GITHUB_WORKSPACE/schemas/hub.schema.json |