Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@ on:
push:
branches: [main]
pull_request:
branches: [main]

permissions: {}

jobs:
changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
changed: ${{ steps.filter.outputs.changed }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: 🔎 checking for changes
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3
id: filter
with:
filters: |
changed:
- '.github/workflows/**'
- 'src/generator/**'
- 'src/netex/**'
- 'src/siri/**'
Expand All @@ -38,5 +39,7 @@ jobs:
build-and-test:
needs: [changes]
uses: ./.github/workflows/build-test-publish.yml
permissions:
contents: read
with:
should-run: ${{ needs.changes.outputs.changed }}
8 changes: 5 additions & 3 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,22 @@ jobs:
build-test-publish:
if: inputs.should-run == 'true'
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0 # required for MinVer
persist-credentials: false

- name: setup .NET
uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json
cache: true
cache-dependency-path: |
src/Directory.Packages.props
packages/*.nupkg # TODO: remove once we move back to a stable xscgen package
packages/*.nupkg

- name: build solution
run: dotnet build Spillgebees.Transmodel.slnx --configuration Release
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ permissions: {}
jobs:
build-and-test:
uses: ./.github/workflows/build-test-publish.yml
permissions:
contents: read
with:
should-package: true

Expand All @@ -18,12 +20,12 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
sparse-checkout: global.json
persist-credentials: false

- uses: actions/setup-dotnet@c2fa09f4bde5ebb9d1777cf28262a3eb3db3ced7 # v5
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
global-json-file: global.json

Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"sdk": {
"rollForward": "feature",
"version": "10.0.203"
"version": "10.0.401"
},
"test": {
"runner": "Microsoft.Testing.Platform"
Expand Down
8 changes: 4 additions & 4 deletions src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
</PropertyGroup>
<ItemGroup>
<!-- Build tooling -->
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="2.0.2" />
<PackageVersion Include="MinVer" Version="7.0.0" />
<PackageVersion Include="DotNet.ReproducibleBuilds" Version="2.0.5" />
<PackageVersion Include="MinVer" Version="8.0.0" />

<!-- Generator dependencies -->
<PackageVersion Include="XmlSchemaClassGenerator-beta" Version="99.0.14-local" />
<PackageVersion Include="XmlSchemaClassGenerator.Analyzer" Version="99.0.14-local" />
<PackageVersion Include="System.CommandLine" Version="2.0.7" />
<PackageVersion Include="System.CommandLine" Version="2.0.12" />

<!-- Test dependencies -->
<PackageVersion Include="TUnit" Version="1.65.38" />
<PackageVersion Include="TUnit" Version="1.72.16" />
<PackageVersion Include="AwesomeAssertions" Version="9.6.0" />
</ItemGroup>
</Project>
Loading