Skip to content

Commit 212bcf3

Browse files
committed
update workflows
1 parent 3bbe092 commit 212bcf3

File tree

5 files changed

+53
-105
lines changed

5 files changed

+53
-105
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,17 @@ jobs:
4040
strategy:
4141
fail-fast: false
4242
matrix:
43-
language: [ 'csharp' ]
4443
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
4544
# Learn more about CodeQL language support at https://git.io/codeql-language-support
45+
include:
46+
- language: csharp
47+
build-mode: manual
48+
source-root: './src'
4649

4750
steps:
4851
- name: Checkout repository
49-
uses: actions/checkout@v4.2.1
52+
uses: actions/checkout@v4.2.2
5053

51-
# Initializes the CodeQL tools for scanning.
5254
- name: Initialize CodeQL
5355
uses: github/codeql-action/init@v3
5456
with:
@@ -59,22 +61,12 @@ jobs:
5961
# queries: ./path/to/local/query, your-org/your-repo/queries@main
6062
config-file: ./.github/codeql/configurations.yml
6163

62-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
63-
# If this step fails, then you should remove it and run the build manually (see below)
64-
# - name: Autobuild
65-
# uses: github/codeql-action/autobuild@v2
64+
- name: Autobuild
65+
if: ${{ (matrix.build-mode == 'autobuild') || (matrix.build-mode == '') }}
66+
uses: github/codeql-action/autobuild@v3
6667

67-
# ℹ️ Command-line programs to run using the OS shell.
68-
# 📚 https://git.io/JvXDl
69-
70-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
71-
# and modify them (or add more) to build your code if your project
72-
# uses a compiled language
73-
74-
#- run: |
75-
# make bootstrap
76-
# make release
77-
- name: Custom build steps
68+
- name: Build all .NET projects
69+
if: ${{ (matrix.build-mode == 'manual') && (matrix.language == 'csharp') }}
7870
run: |
7971
./eng/BuildAllProjects.ps1
8072

.github/workflows/generate-release-target.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
exit 1
6262
6363
run-generate-release-target:
64-
uses: smdn/Smdn.Fundamentals/.github/workflows/generate-release-target.yml@workflows/release-target-v1.9.0
64+
uses: smdn/Smdn.Fundamentals/.github/workflows/generate-release-target.yml@workflows/release-target-v1.10.0
6565
needs: determine-release-target
6666
if: startsWith(needs.determine-release-target.outputs.tag_name, 'new-release/')
6767
with:
@@ -71,7 +71,7 @@ jobs:
7171
release_tag_prefix: 'releases/'
7272
workflow_runs_on: 'ubuntu-24.04'
7373
dotnet_sdk_version: '8.0.100'
74-
dry_run: ${{ fromJSON(needs.determine-release-target.outputs.dry_run) }}
74+
dry_run: ${{ needs.determine-release-target.outputs.dry_run == 'true' }}
7575
secrets:
7676
token_repo: ${{ secrets.PUBLISH_NEW_RELEASE }}
7777
token_pullrequest: ${{ secrets.PUBLISH_NEW_RELEASE }}

.github/workflows/publish-release-target.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515

1616
jobs:
1717
run-publish-release-target:
18-
uses: smdn/Smdn.Fundamentals/.github/workflows/publish-release-target.yml@workflows/release-target-v1.9.0
18+
uses: smdn/Smdn.Fundamentals/.github/workflows/publish-release-target.yml@workflows/release-target-v1.10.0
1919
if: |
2020
(github.event.pull_request.merged == true && startsWith(github.head_ref, 'releases/')) &&
2121
(contains(github.event.pull_request.labels.*.name, 'release-target'))

.github/workflows/test-packages.yml

Lines changed: 20 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ on:
1515
type: string
1616

1717
os:
18-
description: "The OS label which run the test on. (ex: ubuntu-22.04, ubuntu-20.04, windows-latest, macos-latest)"
18+
description: "The OS label which run the test on. (ubuntu-24.04, ubuntu-22.04, windows-latest, macos-latest, etc.)"
19+
required: false
20+
type: string
21+
22+
dotnet_sdk_version:
23+
description: "The minimum .NET SDK version which is used to run tests."
1924
required: false
2025
type: string
2126

@@ -41,52 +46,21 @@ on:
4146
type: string
4247

4348
jobs:
44-
prerequisites:
45-
runs-on: ubuntu-latest
46-
outputs:
47-
os: ${{ steps.input-prerequisites.outputs.os }}
48-
verbose: ${{ steps.input-prerequisites.outputs.verbose }}
49-
env:
50-
RUNS_ON_OS_LIST_DEFAULT: 'ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-latest, macos-latest'
51-
steps:
52-
- name: Delay until the package is published
53-
run: |
54-
# If the workflow is triggered by 'release' event,
55-
# wait for a while until the package is published on NuGet
56-
if [ '${{ github.event_name }}' = 'release' ]; then
57-
sleep 5.0m
58-
fi
59-
60-
- name: Determine prerequisites
61-
id: input-prerequisites
62-
run: |
63-
if [ -z '${{ github.event.inputs.os }}' ]; then
64-
echo "os=${RUNS_ON_OS_LIST_DEFAULT}" >> $GITHUB_OUTPUT
65-
else
66-
echo 'os=${{ github.event.inputs.os }}' >> $GITHUB_OUTPUT
67-
fi
68-
69-
if [ '${{ github.event.inputs.verbose }}' = 'true' ]; then
70-
echo 'verbose=true' >> $GITHUB_OUTPUT
71-
else
72-
echo 'verbose=false' >> $GITHUB_OUTPUT
73-
fi
74-
7549
run-test:
76-
uses: smdn/Smdn.Fundamentals/.github/workflows/test.yml@workflows/test-v1.3.2
77-
needs: prerequisites
50+
name: Run tests with released packages
51+
uses: smdn/Smdn.Fundamentals/.github/workflows/test.yml@workflows/test-v1.4.0
7852
with:
79-
project: ${{ github.event.inputs.project }}
80-
os: ${{ needs.prerequisites.outputs.os }}
81-
extra_options_common: '/p:TestReleasedPackage=true'
82-
verbose: ${{ fromJSON(needs.prerequisites.outputs.verbose) }}
83-
path_proj_install_project_assets: "eng/InstallProjectAssets.proj"
84-
dotnet_sdk_version: '8.0.100'
85-
timeout_minutes_test_job: 10
86-
timeout_hang: "[ {'OS':'windows','Timeout':'6min'}, {'OS':'macos','Timeout':'3min'}, {'OS':'','Timeout':'1min'} ]"
87-
timeout_vstest_connection: "[ {'OS':'windows','Timeout':360}, {'OS':'macos','Timeout':180}, {'OS':'','Timeout':60} ]"
88-
dotnet_test_options_verbosity_level: ${{ github.event.inputs.dotnet_test_options_verbosity_level }}
89-
dotnet_test_options_framework: ${{ github.event.inputs.dotnet_test_options_framework }}
90-
dotnet_test_options_filter_expression: ${{ github.event.inputs.dotnet_test_options_filter_expression }}
53+
project: ${{ inputs.project }}
54+
os: ${{ inputs.os == '' && 'ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-latest, macos-latest' || inputs.os }}
55+
extra_options_common: '/p:TestReleasedPackage=true'
56+
verbose: ${{ inputs.verbose == 'true' }}
57+
path_proj_install_project_assets: "eng/InstallProjectAssets.proj"
58+
dotnet_sdk_version: ${{ inputs.dotnet_sdk_version == '' && '8.0.100' || inputs.dotnet_sdk_version }}
59+
timeout_minutes_test_job: 10
60+
timeout_hang: "[ {'OS':'windows','Timeout':'6min'}, {'OS':'macos','Timeout':'3min'}, {'OS':'','Timeout':'1min'} ]"
61+
timeout_vstest_connection: "[ {'OS':'windows','Timeout':360}, {'OS':'macos','Timeout':180}, {'OS':'','Timeout':60} ]"
62+
dotnet_test_options_verbosity_level: ${{ inputs.dotnet_test_options_verbosity_level }}
63+
dotnet_test_options_framework: ${{ inputs.dotnet_test_options_framework }}
64+
dotnet_test_options_filter_expression: ${{ inputs.dotnet_test_options_filter_expression }}
9165
secrets:
9266
token_repo: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 20 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ on:
2828
type: string
2929

3030
os:
31-
description: "The OS label which run the test on. (ex: ubuntu-22.04, ubuntu-20.04, windows-latest, macos-latest)"
31+
description: "The OS label which run the test on. (ubuntu-24.04, ubuntu-22.04, windows-latest, macos-latest, etc.)"
32+
required: false
33+
type: string
34+
35+
dotnet_sdk_version:
36+
description: "The minimum .NET SDK version which is used to run tests."
3237
required: false
3338
type: string
3439

@@ -59,44 +64,21 @@ on:
5964
type: string
6065

6166
jobs:
62-
prerequisites:
63-
runs-on: ubuntu-latest
64-
outputs:
65-
os: ${{ steps.input-prerequisites.outputs.os }}
66-
verbose: ${{ steps.input-prerequisites.outputs.verbose }}
67-
env:
68-
RUNS_ON_OS_LIST_DEFAULT: 'ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-latest, macos-latest'
69-
steps:
70-
- name: Determine prerequisites
71-
id: input-prerequisites
72-
run: |
73-
if [ -z '${{ github.event.inputs.os }}' ]; then
74-
echo "os=${RUNS_ON_OS_LIST_DEFAULT}" >> $GITHUB_OUTPUT
75-
else
76-
echo 'os=${{ github.event.inputs.os }}' >> $GITHUB_OUTPUT
77-
fi
78-
79-
if [ '${{ github.event.inputs.verbose }}' = 'true' ]; then
80-
echo 'verbose=true' >> $GITHUB_OUTPUT
81-
else
82-
echo 'verbose=false' >> $GITHUB_OUTPUT
83-
fi
84-
8567
run-test:
86-
uses: smdn/Smdn.Fundamentals/.github/workflows/test.yml@workflows/test-v1.3.2
87-
needs: prerequisites
68+
name: Run tests
69+
uses: smdn/Smdn.Fundamentals/.github/workflows/test.yml@workflows/test-v1.4.0
8870
with:
89-
project: ${{ github.event.inputs.project }}
90-
os: ${{ needs.prerequisites.outputs.os }}
91-
verbose: ${{ fromJSON(needs.prerequisites.outputs.verbose) }}
92-
path_proj_install_project_assets: "eng/InstallProjectAssets.proj"
93-
dotnet_sdk_version: '8.0.100'
94-
timeout_minutes_test_job: 10
95-
timeout_hang: "[ {'OS':'windows','Timeout':'6min'}, {'OS':'macos','Timeout':'3min'}, {'OS':'','Timeout':'1min'} ]"
96-
timeout_vstest_connection: "[ {'OS':'windows','Timeout':360}, {'OS':'macos','Timeout':180}, {'OS':'','Timeout':60} ]"
97-
extra_options_common: ${{ github.event.inputs.extra_options_common }}
98-
dotnet_test_options_verbosity_level: ${{ github.event.inputs.dotnet_test_options_verbosity_level }}
99-
dotnet_test_options_framework: ${{ github.event.inputs.dotnet_test_options_framework }}
100-
dotnet_test_options_filter_expression: ${{ github.event.inputs.dotnet_test_options_filter_expression }}
71+
project: ${{ inputs.project }}
72+
os: ${{ inputs.os == '' && 'ubuntu-24.04, ubuntu-22.04, ubuntu-20.04, windows-latest, macos-latest' || inputs.os }}
73+
verbose: ${{ inputs.verbose == 'true' }}
74+
path_proj_install_project_assets: "eng/InstallProjectAssets.proj"
75+
dotnet_sdk_version: ${{ inputs.dotnet_sdk_version == '' && '8.0.100' || inputs.dotnet_sdk_version }}
76+
timeout_minutes_test_job: 10
77+
timeout_hang: "[ {'OS':'windows','Timeout':'6min'}, {'OS':'macos','Timeout':'3min'}, {'OS':'','Timeout':'1min'} ]"
78+
timeout_vstest_connection: "[ {'OS':'windows','Timeout':360}, {'OS':'macos','Timeout':180}, {'OS':'','Timeout':60} ]"
79+
extra_options_common: ${{ inputs.extra_options_common }}
80+
dotnet_test_options_verbosity_level: ${{ inputs.dotnet_test_options_verbosity_level }}
81+
dotnet_test_options_framework: ${{ inputs.dotnet_test_options_framework }}
82+
dotnet_test_options_filter_expression: ${{ inputs.dotnet_test_options_filter_expression }}
10183
secrets:
10284
token_repo: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)