0e98e1cccd
* Refactor CI to run integration tests as separate workflow * Tool restore * correct cache path * conditionally use container registry * use sln because net8 * fix typo * Correct trait filter * Correct mistake again * fix again * fml * clarify names * hopefully we're properly filtering test categories now * maybe this? * What does this do? * revert is test project changes * IsTestProject fix * Correct test setup for automate * maybe fix unit tests * docker-compose-file alighment * remove debug * Ok tests should now pass
53 lines
1.5 KiB
YAML
53 lines
1.5 KiB
YAML
name: PR Test
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
env:
|
|
Solution: "Speckle.Sdk.sln"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
|
|
- name: Setup .NET
|
|
uses: actions/setup-dotnet@v5
|
|
with:
|
|
dotnet-version: 8.x.x
|
|
cache: true
|
|
cache-dependency-path: "**/packages.lock.json"
|
|
|
|
- name: 📦 Tool Restore
|
|
run: dotnet tool restore
|
|
|
|
- name: 📄 Format
|
|
run: dotnet csharpier check .
|
|
|
|
- name: 📦 Restore
|
|
run: dotnet restore ${{ env.Solution }} --locked-mode
|
|
|
|
- name: 🏗️ Build
|
|
run: dotnet build ${{ env.Solution }} --configuration Release --no-restore -warnaserror
|
|
|
|
- name: 🔨 Unit Tests
|
|
run: dotnet test ${{ env.Solution }} --configuration Release --filter "Category!=Integration" --no-build --no-restore --verbosity=normal /p:AltCover=true /p:AltCoverAttributeFilter=ExcludeFromCodeCoverage
|
|
|
|
- name: Upload coverage reports to Codecov with GitHub Action
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
files: tests/**/coverage.xml
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
integration-test-internal:
|
|
uses: "./.github/workflows/integration-test.yml"
|
|
with:
|
|
docker-compose-file: "docker-compose-internal.yml"
|
|
use-github-container-registry: true
|
|
|
|
integration-test-public:
|
|
uses: "./.github/workflows/integration-test.yml"
|
|
with:
|
|
docker-compose-file: "docker-compose.yml"
|