fix a typo in the Java code of the blog #1938
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
permissions: | |
contents: read | |
issues: read | |
checks: write | |
pull-requests: write | |
jobs: | |
ci: | |
name: CI | |
runs-on: ${{ matrix.os }} | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
version: [11, 17, 21] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Checkout testsuite | |
uses: actions/checkout@v4 | |
with: | |
repository: WebAssembly/testsuite | |
path: testsuite | |
# The ref needs to stay in sync with the default value in test-gen-plugin | |
ref: c2a67a575ddc815ff2212f68301d333e5e30a923 | |
- name: Checkout wasi-testsuite | |
uses: actions/checkout@v4 | |
with: | |
repository: WebAssembly/wasi-testsuite | |
path: wasi-testsuite | |
ref: prod/testsuite-base | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '${{ matrix.version }}' | |
cache: maven | |
- name: Test Java and Check Style | |
run: mvn -B clean install spotless:check | |
docs-ci: | |
runs-on: ubuntu-latest | |
name: CI - Docs | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: maven | |
- name: set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
- name: Build Chicory | |
run: mvn -B -Dquickly | |
- name: Test Docs | |
working-directory: docs | |
run: | | |
npm ci | |
npm run test | |
test-results: | |
name: Test Results | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
strategy: | |
fail-fast: false | |
matrix: | |
folder: [runtime-tests, aot-tests, wasi-tests] | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Checkout testsuite | |
uses: actions/checkout@v4 | |
with: | |
repository: WebAssembly/testsuite | |
path: testsuite | |
# The ref needs to stay in sync with the default value in test-gen-plugin | |
ref: c2a67a575ddc815ff2212f68301d333e5e30a923 | |
- name: Checkout wasi-testsuite | |
uses: actions/checkout@v4 | |
with: | |
repository: WebAssembly/wasi-testsuite | |
path: wasi-testsuite | |
ref: prod/testsuite-base | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: maven | |
- name: Test Java | |
run: mvn -B clean install | |
- name: Name | |
id: name | |
run: | | |
case ${{ matrix.folder }} in | |
runtime-tests) | |
echo "NAME=Interpreter" >> $GITHUB_ENV | |
echo "BADGE_NAME=interpreter" >> $GITHUB_ENV | |
;; | |
aot-tests) | |
echo "NAME=AOT" >> $GITHUB_ENV | |
echo "BADGE_NAME=aot" >> $GITHUB_ENV | |
;; | |
wasi-tests) | |
echo "NAME=WASI" >> $GITHUB_ENV | |
echo "BADGE_NAME=wasi" >> $GITHUB_ENV | |
;; | |
esac | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b | |
id: test-results | |
with: | |
check_name: ${{ env.NAME }} Tests Results | |
comment_mode: off | |
compare_to_earlier_commit: false | |
files: './${{ matrix.folder }}/**/surefire-reports/*.xml' | |
- name: Publish badge conditional | |
id: publish | |
if: | | |
(github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main' || | |
github.event_name != 'workflow_run' && github.ref == 'refs/heads/main') | |
run: echo "badge=true" >> $GITHUB_OUTPUT | |
- name: Set badge color | |
shell: bash | |
if: steps.publish.outputs.badge | |
run: | | |
case ${{ fromJSON( steps.test-results.outputs.json ).conclusion }} in | |
success) | |
echo "BADGE_COLOR=31c653" >> $GITHUB_ENV | |
;; | |
failure) | |
echo "BADGE_COLOR=800000" >> $GITHUB_ENV | |
;; | |
neutral) | |
echo "BADGE_COLOR=696969" >> $GITHUB_ENV | |
;; | |
esac | |
- name: Create badge | |
uses: emibcn/badge-action@808173dd03e2f30c980d03ee49e181626088eee8 | |
if: steps.publish.outputs.badge | |
with: | |
label: 'Tests ${{ env.NAME }}' | |
status: '${{ fromJSON( steps.test-results.outputs.json ).stats.tests_succ }} success, ${{ fromJSON( steps.test-results.outputs.json ).stats.tests_skip }} skip, ${{ fromJSON( steps.test-results.outputs.json ).stats.tests_fail }} failures, ${{ fromJSON( steps.test-results.outputs.json ).stats.tests_error }} errors, ${{ fromJSON( steps.test-results.outputs.json ).stats.tests }} total' | |
color: ${{ env.BADGE_COLOR }} | |
path: badge-${{ env.BADGE_NAME }}.svg | |
- name: Upload badge to GH Action | |
uses: actions/upload-artifact@v4 | |
with: | |
name: badge-${{ env.BADGE_NAME }} | |
path: badge-${{ env.BADGE_NAME }}.svg | |
- name: Upload badge to Gist | |
if: steps.publish.outputs.badge | |
uses: andymckay/append-gist-action@ab30bf28df67017c7ad696500b218558c7c04db3 | |
with: | |
token: ${{ secrets.GIST_TOKEN }} | |
gistURL: https://gist.githubusercontent.com/andreaTP/69354d1cc6cf23e4c3c4a9a8daf7ea15 | |
file: badge-${{ env.BADGE_NAME }}.svg |