Skip to content

visualization fixes #876

visualization fixes

visualization fixes #876

Workflow file for this run

on:
push:
branches: [main, ifc2-foundations] # TODO ifc2-foundations only while that feature branch is active
pull_request:
branches: ['*']
workflow_dispatch: {}
concurrency:
cancel-in-progress: true
group: templates-compilation-${{ github.ref }}
name: iac-templates
jobs:
list-templates:
outputs:
to_test: ${{ steps.find_dirs.outputs.to_test }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: find templates
id: find_dirs
run: |
json="$(find pkg/infra/iac2/templates -type d -maxdepth 1 -mindepth 1 -exec basename {} \; \
| jq -csR 'split("\n") | map(select(. != ""))')"
echo "to_test=$json" > $GITHUB_OUTPUT
checks:
needs: [list-templates]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
template_dir: ${{ fromJson(needs.list-templates.outputs.to_test) }}
defaults:
run:
working-directory: pkg/infra/iac2/templates/${{ matrix.template_dir }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16
- name: check for unexpected files
run:
expected="factory.ts\npackage-lock.json\npackage.json"
echo "SHOWING EXPECTED / ACTUAL"
diff --side-by-side <(echo "$expected") <(ls -1)
- run: npm install typescript --no-save
- run: npm install
- run: npx tsc factory.ts
- name: install depcheck
run: npm install --no-save depcheck
- name: run depcheck
run: npx depcheck