Simplify the core Elm compiler module by separating parsing #2288
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: 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@v3 | |
- uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '8.0.100-rc.2.23502.2' | |
- 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/test-elm-time/test-elm-time.csproj && dotnet nuget locals all --clear | |
- 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@v3 | |
if: always() | |
with: | |
name: test-results-${{ github.sha }}-${{ matrix.environment }} | |
path: ./implement/test-elm-time/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/test-elm-time/TestResults/**/*.xml | |
./implement/test-elm-time/TestResults/**/*.trx | |
./implement/test-elm-time/TestResults/**/*.json | |
- name: dotnet publish | |
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/elm-time | |
- name: Copy artifacts to publish | |
shell: pwsh | |
run: | | |
New-Item -ItemType Directory -Force -Path "./publish"; | |
Get-ChildItem -Path "./dotnet-build/" -Filter "elm-time*" | ForEach-Object { Copy-Item -Path $_.FullName -Destination "./publish/" } | |
- name: Publish artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: elm-time-bin-${{ github.sha }}-${{ matrix.publish-runtime-id }} | |
path: ./publish | |
- name: dotnet publish with separate assemblies | |
run: dotnet publish -c Debug ./implement/elm-time --output ./publish-separate-assemblies | |
- name: Publish artifacts with separate assemblies | |
uses: actions/upload-artifact@v3 | |
with: | |
name: elm-time-separate-assemblies-${{ github.sha }}-${{ matrix.publish-runtime-id }} | |
path: ./publish-separate-assemblies | |
- name: self-test | |
run: ./publish/elm-time self-test | |
- name: Elm App Compiler - Run tests with elm-time 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/elm-time elm-test-rs ./implement/elm-time/ElmTime/compile-elm-program |