Skip to content

Adds support for macro-aware transcoding from text. #656

Adds support for macro-aware transcoding from text.

Adds support for macro-aware transcoding from text. #656

Workflow file for this run

name: ion-test-driver
on:
pull_request:
paths:
- 'src/**'
permissions:
contents: read
jobs:
ion-test-driver:
runs-on: ubuntu-latest
steps:
- name: Checkout ion-java
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # master
with:
repository: amazon-ion/ion-java
ref: master
path: ion-java
- name: Checkout ion-test-driver
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # master
with:
repository: amazon-ion/ion-test-driver
ref: master
path: ion-test-driver
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Set up python3 env
run: python3 -m venv ion-test-driver/venv && . ion-test-driver/venv/bin/activate
- name: Pip install
run: pip3 install -r ion-test-driver/requirements.txt && pip3 install -e ion-test-driver
- name: Get main branch HEAD sha
run: cd ion-java && echo `git rev-parse --short=7 HEAD` && echo "main=`git rev-parse --short=7 HEAD`" >> $GITHUB_ENV
- name: Get current commit sha
run: cd ion-java && echo `git rev-parse --short=7 ${{ github.event.pull_request.head.sha }}`
&& echo "cur=`git rev-parse --short=7 ${{ github.event.pull_request.head.sha }}`" >> $GITHUB_ENV
- name: Run ion-test-driver
run: python3 ion-test-driver/amazon/iontest/ion_test_driver.py -o output
-i ion-java,${{ github.event.pull_request.head.repo.html_url }},${{ github.event.pull_request.head.sha }}
--replace ion-java,https://github.com/amazon-ion/ion-java.git,$main
- name: Upload result
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
with:
name: ion-test-driver-result.ion
path: output/results/ion-test-driver-results.ion
- name: showing result
run: cat output/results/ion-test-driver-results.ion
- name: Analyze two implementations
continue-on-error: true
id: result-diff
run: python3 ion-test-driver/amazon/iontest/ion_test_driver.py -R
ion-java,$main ion-java,$cur output/results/ion-test-driver-results.ion
- name: Upload analysis report
uses: actions/upload-artifact@1eb3cb2b3e0f29609092a73eb033bb759a334595 # v4.1.0
with:
name: analysis-report.ion
path: result.ion
- name: showing report
run: cat result.ion
- name: Check if ion-test-driver fails
if: ${{ steps.result-diff.outcome == 'failure' }}
run: echo 'Implementation behavior changed, Refer to the analysis report in the previous step for the reason.' && exit 1
open-issue:
permissions:
contents: read # for JasonEtco/create-an-issue to read template files
issues: write # for JasonEtco/create-an-issue to create new issues
runs-on: ubuntu-latest
needs: ion-test-driver
if: ${{ failure() }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # master
- name: Open an issue
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_WORKFLOW_URL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
GITHUB_PR_SHA: ${{ github.event.pull_request.head.sha }}
with:
assignees: ${{ github.event.sender.login }}
filename: .github/ion-test-driver-issue.md