Skip to content

more test

more test #5933

Workflow file for this run

name: Main Test and Release
on:
workflow_dispatch:
push:
paths:
# run when unity asset is changed, or CI is updated
- 'Assets/**'
- 'Packages/**'
- 'ProjectSettings/**'
- '.releaserc.yml'
- '.github/workflows/main.yml'
- '.github/workflows/run-test.yml'
- 'CSharpAnalyzers/**'
# available list of containers here:
# https://hub.docker.com/r/unityci/editor/tags?page=1&ordering=last_updated&name=ubuntu-2020.1.17f1-base
jobs:
Tests2022:
name: Run Tests 2022
uses: ./.github/workflows/run-test.yml
secrets:
# checking if same license will work
unity_license: ${{ secrets.UNITY_LICENSE_2021_3_4 }}
access_token: ${{ secrets.GITHUB_TOKEN }}
with:
unity_container: unityci/editor:ubuntu-2022.3.62f2-base-3.2.2
cache_key: Library-2022.3.62
cache_key_restore: Library-2022
test_results_name: Test results 2022
Tests6000:
name: Run Tests 6000
uses: ./.github/workflows/run-test.yml
secrets:
# checking if same license will work
unity_license: ${{ secrets.UNITY_LICENSE_2021_3_4 }}
access_token: ${{ secrets.GITHUB_TOKEN }}
with:
unity_container: unityci/editor:ubuntu-6000.0.75f1-base-3.2.2
cache_key: Library-6000.0.75
cache_key_restore: Library-6000
test_results_name: Test results 6000
Tests6000_3:
name: Run Tests 6000.3
uses: ./.github/workflows/run-test.yml
secrets:
# checking if same license will work
unity_license: ${{ secrets.UNITY_LICENSE_2021_3_4 }}
access_token: ${{ secrets.GITHUB_TOKEN }}
with:
unity_container: unityci/editor:ubuntu-6000.3.16f1-base-3.2.2
cache_key: Library-6000.3.16
cache_key_restore: Library-6000
test_results_name: Test results 6000.3
BuildIL2CPP:
name: BuildIL2CPP
runs-on: ubuntu-latest
container: unityci/editor:ubuntu-2022.3.62f2-linux-il2cpp-3.2.2
steps:
- name: Activate unity
# exit code is 1 for manual activation
continue-on-error: true
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE2 }}
run: |
echo "$UNITY_LICENSE" | tr -d '\r' > UnityLicenseFile.ulf
unity-editor -nographics -logFile /dev/stdout -manualLicenseFile UnityLicenseFile.ulf -quit
- name: Checkout repository
uses: actions/checkout@v6
- name: Cache Library
id: cache-library
uses: actions/cache/restore@v5
with:
path: Library
key: Library-2022.3.62
restore-keys: Library-2022
- name: Run by Build with il2cpp
# checks that all weaver generate code in the test dlls also compiles for IL2CPP
run: unity-editor -nographics -logFile /dev/stdout -executeMethod Mirage.Tests.BuildIL2CPP.BuildTests.BuildWithIl2CPP -quit
timeout-minutes: 20
AnalyzerTests:
name: Run Analyzer Tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Run Tests
run: dotnet test CSharpAnalyzers/Mirage.Analyzers.slnx -c Release
Publish:
# only run once both tests and il2cpp have passed
needs: [Tests2022, Tests6000, Tests6000_3, BuildIL2CPP, AnalyzerTests]
# only run on main
if: github.ref == 'refs/heads/main'
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Build Analyzer DLL
run: dotnet build CSharpAnalyzers/Mirage.Analyzers.slnx -c Release
- uses: actions/setup-node@v6
with:
node-version: '24'
- name: Release
uses: cycjimmy/semantic-release-action@v6
id: semantic
with:
semantic_version: 25
extra_plugins: |
@semantic-release/exec
@semantic-release/changelog
@semantic-release/git
branch: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}