Skip to content

Making js_test look neat alongside kt_test. #27

Making js_test look neat alongside kt_test.

Making js_test look neat alongside kt_test. #27

Workflow file for this run

name: JavaScript Transpilation Tests
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize]
jobs:
run-tests-js:
runs-on: ubuntu-latest
steps:
- name: 'Check out Asbyrgi'
uses: actions/checkout@v3
with:
path: asbyrgi
ref: ${{ github.ref }}
- name: 'Use `node.js`'
uses: actions/setup-node@v3
- name: 'Run `npm i`'
run: |
(cd asbyrgi; npm i)
- name: 'Build the Asbyrgi container'
id: asbyrgi_container
run: |
(cd asbyrgi; docker build .)
echo ::set-output name=ASBYRGI_CONTAINER_ID::$(cd asbyrgi; docker build -q .)
- name: 'Generate all `golden`-s'
run: |
export ASBYRGI_CONTAINER_ID=${{ steps.asbyrgi_container.outputs.ASBYRGI_CONTAINER_ID }}
(cd asbyrgi; ./scripts/gen_all_goldens.sh)
- name: 'Generate all JavaScript policies'
run: |
export ASBYRGI_CONTAINER_ID=${{ steps.asbyrgi_container.outputs.ASBYRGI_CONTAINER_ID }}
(cd asbyrgi; ./scripts/gen_all_js.sh)
- name: 'Generate all the tests.'
run: |
export ASBYRGI_CONTAINER_ID=${{ steps.asbyrgi_container.outputs.ASBYRGI_CONTAINER_ID }}
(cd asbyrgi; ./scripts/gen_all_js_tests.sh)
- name: 'RUN ALL JAVASCRIPT TESTS'
run: |
(cd asbyrgi; ./node_modules/mocha/bin/mocha.js js_test/all_tests.js)