Switch bundled Elm compiler to elm-syntax version 7.3.7 #3423
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: test-and-publish | |
on: [push,workflow_dispatch] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
environment: [ubuntu-22.04, windows-2022, macos-13] | |
include: | |
- environment: ubuntu-22.04 | |
publish-runtime-id: linux-x64 | |
- environment: windows-2022 | |
publish-runtime-id: win-x64 | |
- environment: macos-13 | |
publish-runtime-id: osx-x64 | |
runs-on: ${{ matrix.environment }} | |
steps: | |
- name: Avoid git mutating files on checkout | |
run: | | |
git config --global core.autocrlf false | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '8.0.403' | |
- name: Try use dotnet | |
run: dotnet --info | |
- name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155 | |
run: | | |
dotnet clean ./implement/PineTest/Pine.UnitTests/Pine.UnitTests.csproj && dotnet nuget locals all --clear | |
dotnet clean ./implement/test-elm-time/test-elm-time.csproj && dotnet nuget locals all --clear | |
- name: Prebuild | |
working-directory: ./implement/ | |
run: | | |
dotnet run --project ./prebuild/prebuild.csproj | |
- name: Run Pine tests with dotnet test | |
run: | | |
dotnet test ./implement/PineTest/Pine.UnitTests/Pine.UnitTests.csproj --logger "trx" --diag "./implement/PineTest/Pine.UnitTests/TestResults/diag-log.txt" --verbosity diagnostic | |
- name: Run tests with dotnet test | |
run: | | |
dotnet test ./implement/test-elm-time/test-elm-time.csproj --logger "trx" --diag "./implement/test-elm-time/TestResults/diag-log.txt" --verbosity diagnostic | |
- name: Publish test results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: test-results-${{ github.sha }}-${{ matrix.environment }} | |
# path: ./implement/test-elm-time/TestResults | |
path: ./implement/**/TestResults | |
- name: Compile Overview of Test Results | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
if: always() | |
with: | |
check_name: "Test Results Overview ${{ matrix.environment }}" | |
files: | | |
./implement/**/TestResults/**/*.xml | |
./implement/**/TestResults/**/*.trx | |
./implement/**/TestResults/**/*.json | |
- name: dotnet publish Pine | |
run: dotnet publish -c Debug -r ${{ matrix.publish-runtime-id }} --self-contained true -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:PublishReadyToRunShowWarnings=true --output ./dotnet-build ./implement/pine | |
- name: Copy artifacts to publish | |
shell: pwsh | |
run: | | |
New-Item -ItemType Directory -Force -Path "./publish"; | |
Get-ChildItem -Path "./dotnet-build/" -Filter "pine*" | ForEach-Object { Copy-Item -Path $_.FullName -Destination "./publish/" } | |
- name: Publish artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pine-bin-${{ github.sha }}-${{ matrix.publish-runtime-id }} | |
path: ./publish | |
- name: dotnet publish with separate assemblies | |
run: dotnet publish -c Debug ./implement/pine --output ./publish-separate-assemblies | |
- name: Publish artifacts with separate assemblies | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pine-separate-assemblies-${{ github.sha }}-${{ matrix.publish-runtime-id }} | |
path: ./publish-separate-assemblies | |
- name: self-test | |
run: ./publish/pine self-test | |
- name: Elm App Compiler - Run tests with pine elm-test-rs | |
# Adapt to elm-test-rs crashing on macOS | |
# elm-test-rs also wrote the following before crashing: | |
# elm: security: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory) | |
if: ${{ !contains( matrix.environment, 'macos') }} | |
run: ./publish/pine elm-test-rs ./implement/pine/Elm/elm-compiler |