Skip to content

Bump the dotnet-misc group with 1 update #1408

Bump the dotnet-misc group with 1 update

Bump the dotnet-misc group with 1 update #1408

Workflow file for this run

name: CI Build
on:
push:
branches:
- "main"
paths:
- "src/**"
- "**/*.props"
- "*.slnx"
- "global.json"
- ".github/workflows/ci.yml"
pull_request:
paths:
- "src/**"
- "**/*.props"
- "*.slnx"
- "global.json"
- ".github/workflows/ci.yml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
pull-requests: read
outputs:
dotnet: ${{ steps.filter.outputs.dotnet }}
go: ${{ steps.filter.outputs.go }}
python: ${{ steps.filter.outputs.python }}
web: ${{ steps.filter.outputs.web }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |
dotnet:
- 'src/Garage.ApiService/**'
- 'src/Garage.ApiDatabaseSeeder/**'
- 'src/Garage.ApiModel/**'
- 'src/Garage.AppHost/**'
- 'src/Garage.ServiceDefaults/**'
- 'src/Garage.Shared/**'
- '**/*.props'
- '*.slnx'
- 'global.json'
- '.github/workflows/ci.yml'
go:
- 'src/Garage.FeatureFlags/**'
- '.github/workflows/ci.yml'
python:
- 'src/Garage.ChatService/**'
- '.github/workflows/ci.yml'
web:
- 'src/Garage.Web/**'
- '.github/workflows/ci.yml'
build-dotnet:
needs: changes
if: needs.changes.outputs.dotnet == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Cache NuGet packages
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj', '**/Directory.Packages.props') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET Core
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5.2.0
with:
global-json-file: global.json
- name: Restore dependencies
run: dotnet restore
- name: dotnet format
run: dotnet format --verify-no-changes --no-restore
- name: Build with dotnet
run: dotnet build --configuration Release --no-restore
# - name: Test with dotnet
# run: dotnet test
build-go:
needs: changes
if: needs.changes.outputs.go == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
defaults:
run:
working-directory: src/Garage.FeatureFlags
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: src/Garage.FeatureFlags/go.mod
cache-dependency-path: src/Garage.FeatureFlags/go.sum
- name: Format check
run: |
if [ -n "$(gofmt -l .)" ]; then
echo "Go files are not formatted. Run 'go fmt ./...' to fix."
gofmt -d .
exit 1
fi
# setup-go with cache-dependency-path already restores the Go module cache.
# go test compiles all packages (including those with no test files) before running,
# so a separate `go build` step would double the compilation time.
- name: Test
run: go test -v ./...
build-python:
needs: changes
if: needs.changes.outputs.python == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
defaults:
run:
working-directory: src/Garage.ChatService
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.14'
allow-prereleases: true
cache: 'pip'
cache-dependency-path: |
src/Garage.ChatService/requirements.txt
src/Garage.ChatService/requirements-test.txt
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Run tests
run: pytest
build-web:
needs: changes
if: needs.changes.outputs.web == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
defaults:
run:
working-directory: src/Garage.Web
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
cache: 'npm'
cache-dependency-path: src/Garage.Web/package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build