Add initial string and JSON conversion functions #107
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
name: Push | |
on: | |
push: {} | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: {} | |
jobs: | |
cljs-tests: | |
name: Run CLJS tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: { submodules: 'recursive', fetch-depth: 0 } | |
- name: Install NPM | |
run: npm install | |
- name: Run Tests | |
run: ./test/runtests | |
test-examples: | |
name: Test Examples | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: { submodules: 'recursive', fetch-depth: 0 } | |
- name: Build Image | |
run: | | |
docker build -t dctest . | |
- name: Setup Fixtures | |
run: | | |
docker compose -f examples/docker-compose.yaml up -d | |
- name: Run Intro Examples | |
run: | | |
# Some examples demonstate failure. | |
# Swallow exit code and check the result counts. | |
docker run --rm \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v $(pwd)/examples:/app/examples \ | |
dctest --results-file /app/examples/results.json examples /app/examples/00-intro.yaml \ | |
|| true | |
jq --exit-status '[.passed == 5, .failed == 0, .skipped == 0] | all' examples/results.json | |
- name: Run Intro + Fail Examples | |
run: | | |
# Some examples demonstate failure. | |
# Swallow exit code and check the result counts. | |
docker run --rm \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v $(pwd)/examples:/app/examples \ | |
dctest --results-file /app/examples/results.json examples /app/examples/00-intro.yaml /app/examples/01-fails.yaml \ | |
|| true | |
jq --exit-status '[.passed == 5, .failed == 1, .skipped == 4] | all' examples/results.json | |
- name: Run Intro + Fail Examples with --continue-on-error | |
run: | | |
# Some examples demonstate failure. | |
# Swallow exit code and check the result counts. | |
docker run --rm \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v $(pwd)/examples:/app/examples \ | |
dctest --continue-on-error --results-file /app/examples/results.json examples /app/examples/00-intro.yaml /app/examples/01-fails.yaml \ | |
|| true | |
jq --exit-status '[.passed == 6, .failed == 4, .skipped == 0] | all' examples/results.json | |
- name: Run Dependency Examples | |
run: | | |
# Some examples demonstate failure. | |
# Swallow exit code and check the result counts. | |
docker run --rm \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
-v $(pwd)/examples:/app/examples \ | |
dctest --results-file /app/examples/results.json examples /app/examples/02-deps.yaml \ | |
|| true | |
jq --exit-status '[.passed == 12, .failed == 0, .skipped == 0] | all' examples/results.json | |
- name: Setup Fixtures | |
if: always() | |
run: | | |
docker compose -f examples/docker-compose.yaml down -t 1 --remove-orphans |