refactor and fix minor issues #59
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: Acceptance Tests | |
on: | |
pull_request_target: | |
branches: | |
- main | |
jobs: | |
jsonnet_syntax: | |
name: Jsonnet Syntax | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Base | |
run: git clone --depth 1 ${{ github.event.pull_request.base.repo.html_url }} --branch ${{ github.event.pull_request.base.ref }} base | |
- name: Checkout Head | |
run: git clone --depth 1 ${{ github.event.pull_request.head.repo.html_url }} --branch ${{ github.event.pull_request.head.ref }} head | |
- name: Install Jsonnet | |
run: sudo apt-get install -y jsonnet | |
- name: Test Syntactic Validity | |
run: ./base/.github/scripts/render_json.sh ./head/jsonnet ./head/json | |
jsonnet_fmt: | |
name: Jsonnet Formatting | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Base | |
run: git clone --depth 1 ${{ github.event.pull_request.base.repo.html_url }} --branch ${{ github.event.pull_request.base.ref }} base | |
- name: Checkout Head | |
run: git clone --depth 1 ${{ github.event.pull_request.head.repo.html_url }} --branch ${{ github.event.pull_request.head.ref }} head | |
- name: Install Jsonnet | |
run: sudo apt-get install -y jsonnet | |
- name: Test Jsonnet Formatting | |
run: ./base/.github/scripts/jsonnet_format_check.sh ./head | |
detect_changed_json: | |
name: Detect Changed JSON Files | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Base | |
run: git clone --depth 1 ${{ github.event.pull_request.base.repo.html_url }} --branch ${{ github.event.pull_request.base.ref }} base | |
- name: Checkout Head | |
run: git clone --depth 1 ${{ github.event.pull_request.head.repo.html_url }} --branch ${{ github.event.pull_request.head.ref }} head | |
- name: Check for JSON Diff | |
run: ./base/.github/scripts/detect_changed_json.sh ./head | |
json_diff: | |
name: Show JSON Diff | |
runs-on: ubuntu-20.04 | |
needs: | |
- jsonnet_syntax | |
- jsonnet_fmt | |
- detect_changed_json | |
steps: | |
- name: Checkout Base | |
run: git clone --depth 1 ${{ github.event.pull_request.base.repo.html_url }} --branch ${{ github.event.pull_request.base.ref }} base | |
- name: Checkout Head | |
run: git clone --depth 1 ${{ github.event.pull_request.head.repo.html_url }} --branch ${{ github.event.pull_request.head.ref }} head | |
- name: Install Jsonnet and JQ | |
run: sudo apt-get install -y jsonnet jq | |
- name: Render JSON | |
run: ./base/.github/scripts/render_json.sh ./head/jsonnet ./head/json | |
- name: Show JSON Diff | |
run: ./base/.github/scripts/json_diff_pr_comment.sh ./head | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |