Skip to content

Bump xunit from 2.9.0 to 2.9.2 in /src in the tests group (#356) #99

Bump xunit from 2.9.0 to 2.9.2 in /src in the tests group (#356)

Bump xunit from 2.9.0 to 2.9.2 in /src in the tests group (#356) #99

Workflow file for this run

name: CI
on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*
workflow_dispatch:
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_NOLOGO: 1
UNITY_HASH: '887be4894c44'
UNITY_FULL_VERSION: '2022.3.22f1'
jobs:
compute:
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
deployments: read
packages: none
pull-requests: write
security-events: write
outputs:
UNITY_HASH: ${{ env.UNITY_HASH }}
UNITY_FULL_VERSION: ${{ env.UNITY_FULL_VERSION }}
steps:
- name: Compute outputs
run: |
echo "UNITY_HASH=${{ env.UNITY_HASH }}" >> $GITHUB_OUTPUT
echo "UNITY_FULL_VERSION=${{ env.UNITY_FULL_VERSION }}" >> $GITHUB_OUTPUT
ci:
strategy:
matrix:
include:
- os: ubuntu
download: curl -o ./Unity.tar.xz -k https://download.unity3d.com/download_unity/${{ needs.compute.outputs.UNITY_HASH }}/LinuxEditorInstaller/Unity.tar.xz
install: mkdir -p ~/Unity && tar -xf Unity.tar.xz -C ~/Unity
- os: macos
download: curl -o ./unity.pkg -k https://download.unity3d.com/download_unity/${{ needs.compute.outputs.UNITY_HASH }}/MacEditorInstaller/Unity.pkg
install: sudo installer -package unity.pkg -target /
- os: windows
download: cmd /c bitsadmin /TRANSFER unity /DOWNLOAD /PRIORITY foreground "https://download.unity3d.com/download_unity/${{ needs.compute.outputs.UNITY_HASH }}/Windows64EditorInstaller/UnitySetup64-${{ needs.compute.outputs.UNITY_FULL_VERSION }}.exe" "%CD%\unitysetup.exe"
install: cmd /c unitysetup.exe /UI=reduced /S /D=%ProgramFiles%\Unity
name: CI-${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
needs: compute
permissions:
actions: read
contents: read
deployments: read
packages: none
pull-requests: write
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Download Unity on ${{ matrix.os }}
run: ${{ matrix.download }}
- name: Install Unity on ${{ matrix.os }}
run: ${{ matrix.install }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
- name: Build
run: dotnet build -c Debug ./src/Microsoft.Unity.Analyzers.sln /p:UseSharedCompilation=false
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
- name: Test context (main)
if: github.ref == 'refs/heads/main'
run: echo "TEST_FILTER=." >> $GITHUB_ENV
shell: bash
- name: Test context (feature)
if: github.ref != 'refs/heads/main'
run: echo "TEST_FILTER=FullyQualifiedName!~ConsistencyTests" >> $GITHUB_ENV
shell: bash
- name: Test
run: dotnet test -c Debug ./src/Microsoft.Unity.Analyzers.Tests --filter ${{env.TEST_FILTER}}
shell: bash