Skip to content

add net9.0 to gh action #87

add net9.0 to gh action

add net9.0 to gh action #87

Workflow file for this run

name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout
- name: Checkout repository
uses: actions/checkout@v3
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Build SnowplowTracker
working-directory: SnowplowTracker
run: |
dotnet build
- name: Insert build files into Unity projects
working-directory: SnowplowTracker/SnowplowTracker/bin/Debug/net9.0
run: |
find . -name \*.dll -and -not -name UnityEngine.dll -and -not -name Newtonsoft.Json.dll -exec cp {} ../../../../../SnowplowTracker.Demo/Assets/Plugins/SnowplowTracker/ \;
find . -name \*.dll -and -not -name UnityEngine.dll -and -not -name Newtonsoft.Json.dll -exec cp {} ../../../../../SnowplowTracker.Tests/Assets/Plugins/SnowplowTracker/ \;
# Cache
- uses: actions/cache@v3
with:
path: Library
key: Library-${{ hashFiles('Assets/**', 'Packages/**', 'ProjectSettings/**') }}
restore-keys: |
Library-
- name: Setup Tests
run: |
npm install -g mountebank
mb &
sleep 5
curl -X POST -d @Resources/imposter.json http://localhost:2525/imposters
# Test
- name: Run tests
uses: game-ci/unity-test-runner@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: SnowplowTracker.Tests
useHostNetwork: true
testMode: editmode
githubToken: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: Test results
path: artifacts
# Build
- name: Build project
uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
projectPath: SnowplowTracker.Demo
targetPlatform: StandaloneLinux64
versioning: None
allowDirtyBuild: true
# Output
- uses: actions/upload-artifact@v4
with:
name: Build
path: build