0
0
mirror of https://github.com/ankidroid/Anki-Android.git synced 2024-09-20 03:52:15 +02:00

build(ci): use stable job names

This means that we can upgrade the os without needing
to update branch protection rules

use 'include' to expand the 'os' matrix to include the name
then use the variable as a job name

https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs#example-expanding-configurations

Fixes 15371
This commit is contained in:
David Allison 2024-01-31 14:47:14 +00:00 committed by Mike Hardy
parent b0b2d52f4f
commit 75ef22e419

View File

@ -20,7 +20,7 @@ concurrency:
jobs:
unit:
name: JUnit Tests (${{ matrix.os}})
name: JUnit Tests (${{ matrix.name }})
timeout-minutes: 40
strategy:
fail-fast: false
@ -28,6 +28,14 @@ jobs:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
# macOS 14 is in beta and runs on Apple Silicon [M1]
os: [ubuntu-latest, macos-14, windows-latest]
# define 'name' so we don't need to update branch protection rules if the os changes
include:
- os: ubuntu-latest
name: ubuntu
- os: macos-14
name: macos
- os: windows-latest
name: windows
runs-on: ${{ matrix.os }}
#env:
# CODACY_TOKEN: ${{ secrets.CODACY_TOKEN }}