Skip to content

Commit

Permalink
Test also on windows-2022 environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Dec 16, 2021
1 parent 28e3e11 commit 9bebe53
Show file tree
Hide file tree
Showing 2 changed files with 130 additions and 33 deletions.
61 changes: 44 additions & 17 deletions .github/workflows/template/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ jobs:
key: ${{ github.run_id }}

test_invalid_distribution:
name: Test "${{ matrix.distribution.label }}" distribution
name: Test "${{ matrix.distribution.label }}" distribution on ${{ matrix.environment }}
needs: build
runs-on: windows-latest
runs-on: ${{ matrix.environment }}
steps:
- name: Restore built artifacts from cache
<<: *built_artifacts_cache
Expand All @@ -79,6 +79,10 @@ jobs:
strategy:
fail-fast: false
matrix:
environment: &environments
- windows-2019
- windows-2022
- windows-latest
distribution:
- id: invalid
label: invalid
Expand All @@ -88,9 +92,9 @@ jobs:
label: 'null'

test_default_distribution:
name: Test default distribution ${{ matrix.nothing }}
name: Test default distribution on ${{ matrix.environment }}
needs: build
runs-on: windows-latest
runs-on: ${{ matrix.environment }}
steps:
- name: Restore built artifacts from cache
<<: *built_artifacts_cache
Expand Down Expand Up @@ -313,16 +317,17 @@ jobs:
strategy:
fail-fast: false
matrix:
environment: *environments
distribution:
- &debian
id: Debian
match-pattern: '*Debian*'
default-absent-tool: dos2unix

test:
name: Test "${{ matrix.distribution.id }}" distribution
name: Test "${{ matrix.distribution.id }}" distribution on ${{ matrix.environment }}
needs: build
runs-on: windows-latest
runs-on: ${{ matrix.environment }}
steps:
- name: Restore built artifacts from cache
<<: *built_artifacts_cache
Expand Down Expand Up @@ -673,6 +678,7 @@ jobs:
strategy: &distributions_matrix
fail-fast: false
matrix:
environment: *environments
distribution: &distributions
- *debian
- &alpine
Expand Down Expand Up @@ -701,9 +707,9 @@ jobs:
default-absent-tool: dos2unix

test_additional_packages:
name: Test additional packages for "${{ matrix.distribution.id }}" distribution
name: Test additional packages for "${{ matrix.distribution.id }}" distribution on ${{ matrix.environment }}
needs: build
runs-on: windows-latest
runs-on: ${{ matrix.environment }}
steps:
- name: Restore built artifacts from cache
<<: *built_artifacts_cache
Expand All @@ -726,16 +732,20 @@ jobs:
&& (steps.execute_action.outcome == 'success')
shell: wsl-bash {0}
run: bash -c true

strategy: *distributions_matrix
strategy:
<<: *distributions_matrix
matrix:
environment: *environments
distribution: *distributions

test_multiple_usage_with_different_distributions:
name: Test multiple usage with different distributions
("${{ matrix.distributions.distribution1.id }}"
/ "${{ matrix.distributions.distribution2.id }}"
/ "${{ matrix.distributions.distribution3.id }}")
on ${{ matrix.environment }}
needs: build
runs-on: windows-latest
runs-on: ${{ matrix.environment }}
steps:
- name: Restore built artifacts from cache
<<: *built_artifacts_cache
Expand Down Expand Up @@ -806,6 +816,7 @@ jobs:
strategy:
fail-fast: false
matrix:
environment: *environments
distributions:
- distribution1: *debian
distribution2: *ubuntu_20_04
Expand All @@ -832,9 +843,9 @@ jobs:
distribution3: *debian

test_multiple_usage_with_same_distribution:
name: Test multiple usage with "${{ matrix.distribution.id }}" distribution
name: Test multiple usage with "${{ matrix.distribution.id }}" distribution on ${{ matrix.environment }}
needs: build
runs-on: windows-latest
runs-on: ${{ matrix.environment }}
steps:
- name: Restore built artifacts from cache
<<: *built_artifacts_cache
Expand Down Expand Up @@ -958,20 +969,35 @@ jobs:
strategy:
<<: *distributions_matrix
matrix:
environment: *environments
distribution: *distributions
distribution2:
- *debian
exclude:
- distribution: *debian
- environment: windows-2019
distribution: *debian
distribution2: *debian
- environment: windows-2022
distribution: *debian
distribution2: *debian
- environment: windows-latest
distribution: *debian
distribution2: *debian
include:
- distribution: *debian
- environment: windows-2019
distribution: *debian
distribution2: *ubuntu_20_04
- environment: windows-2022
distribution: *debian
distribution2: *ubuntu_20_04
- environment: windows-latest
distribution: *debian
distribution2: *ubuntu_20_04

test_distribution_specific_wsl_bash_scripts:
name: Test distribution specific wsl-bash scripts ${{ matrix.nothing }}
name: Test distribution specific wsl-bash scripts on ${{ matrix.environment }}
needs: build
runs-on: windows-latest
runs-on: ${{ matrix.environment }}
steps:
- name: Restore built artifacts from cache
<<: *built_artifacts_cache
Expand Down Expand Up @@ -1188,6 +1214,7 @@ jobs:
strategy:
fail-fast: false
matrix:
environment: *environments
distributions:
- distribution1: *debian
distribution2: *alpine
Expand Down
102 changes: 86 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ jobs:
"path": "action.yml\nbuild/distributions/\n"
"key": "${{ github.run_id }}"
"test_invalid_distribution":
name: "Test \"${{ matrix.distribution.label }}\" distribution"
name: "Test \"${{ matrix.distribution.label }}\" distribution on ${{ matrix.environment\
\ }}"
needs: "build"
runs-on: "windows-latest"
runs-on: "${{ matrix.environment }}"
steps:
- name: "Restore built artifacts from cache"
uses: "actions/cache@v2"
Expand All @@ -60,6 +61,10 @@ jobs:
shell: "cmd"
strategy:
matrix:
"environment":
- "windows-2019"
- "windows-2022"
- "windows-latest"
"distribution":
- "id": "invalid"
"label": "invalid"
Expand All @@ -69,9 +74,9 @@ jobs:
"label": "null"
fail-fast: false
"test_default_distribution":
name: "Test default distribution ${{ matrix.nothing }}"
name: "Test default distribution on ${{ matrix.environment }}"
needs: "build"
runs-on: "windows-latest"
runs-on: "${{ matrix.environment }}"
steps:
- name: "Restore built artifacts from cache"
uses: "actions/cache@v2"
Expand Down Expand Up @@ -208,15 +213,20 @@ jobs:
shell: "wsl-bash {0}"
strategy:
matrix:
"environment":
- "windows-2019"
- "windows-2022"
- "windows-latest"
"distribution":
- "id": "Debian"
"match-pattern": "*Debian*"
"default-absent-tool": "dos2unix"
fail-fast: false
"test":
name: "Test \"${{ matrix.distribution.id }}\" distribution"
name: "Test \"${{ matrix.distribution.id }}\" distribution on ${{ matrix.environment\
\ }}"
needs: "build"
runs-on: "windows-latest"
runs-on: "${{ matrix.environment }}"
steps:
- name: "Restore built artifacts from cache"
uses: "actions/cache@v2"
Expand Down Expand Up @@ -501,6 +511,10 @@ jobs:
shell: "wsl-bash {0}"
strategy:
matrix:
"environment":
- "windows-2019"
- "windows-2022"
- "windows-latest"
"distribution":
- "id": "Debian"
"match-pattern": "*Debian*"
Expand All @@ -525,9 +539,10 @@ jobs:
"default-absent-tool": "dos2unix"
fail-fast: false
"test_additional_packages":
name: "Test additional packages for \"${{ matrix.distribution.id }}\" distribution"
name: "Test additional packages for \"${{ matrix.distribution.id }}\" distribution\
\ on ${{ matrix.environment }}"
needs: "build"
runs-on: "windows-latest"
runs-on: "${{ matrix.environment }}"
steps:
- name: "Restore built artifacts from cache"
uses: "actions/cache@v2"
Expand All @@ -550,6 +565,10 @@ jobs:
shell: "wsl-bash {0}"
strategy:
matrix:
"environment":
- "windows-2019"
- "windows-2022"
- "windows-latest"
"distribution":
- "id": "Debian"
"match-pattern": "*Debian*"
Expand All @@ -576,9 +595,9 @@ jobs:
"test_multiple_usage_with_different_distributions":
name: "Test multiple usage with different distributions (\"${{ matrix.distributions.distribution1.id\
\ }}\" / \"${{ matrix.distributions.distribution2.id }}\" / \"${{ matrix.distributions.distribution3.id\
\ }}\")"
\ }}\") on ${{ matrix.environment }}"
needs: "build"
runs-on: "windows-latest"
runs-on: "${{ matrix.environment }}"
steps:
- name: "Restore built artifacts from cache"
uses: "actions/cache@v2"
Expand Down Expand Up @@ -629,6 +648,10 @@ jobs:
shell: "wsl-bash {0}"
strategy:
matrix:
"environment":
- "windows-2019"
- "windows-2022"
- "windows-latest"
"distributions":
- "distribution1":
"id": "Debian"
Expand Down Expand Up @@ -704,9 +727,10 @@ jobs:
"default-absent-tool": "dos2unix"
fail-fast: false
"test_multiple_usage_with_same_distribution":
name: "Test multiple usage with \"${{ matrix.distribution.id }}\" distribution"
name: "Test multiple usage with \"${{ matrix.distribution.id }}\" distribution\
\ on ${{ matrix.environment }}"
needs: "build"
runs-on: "windows-latest"
runs-on: "${{ matrix.environment }}"
steps:
- name: "Restore built artifacts from cache"
uses: "actions/cache@v2"
Expand Down Expand Up @@ -796,6 +820,10 @@ jobs:
shell: "wsl-bash {0}"
strategy:
matrix:
"environment":
- "windows-2019"
- "windows-2022"
- "windows-latest"
"distribution":
- "id": "Debian"
"match-pattern": "*Debian*"
Expand Down Expand Up @@ -823,7 +851,26 @@ jobs:
"match-pattern": "*Debian*"
"default-absent-tool": "dos2unix"
"exclude":
- "distribution":
- "environment": "windows-2019"
"distribution":
"id": "Debian"
"match-pattern": "*Debian*"
"default-absent-tool": "dos2unix"
"distribution2":
"id": "Debian"
"match-pattern": "*Debian*"
"default-absent-tool": "dos2unix"
- "environment": "windows-2022"
"distribution":
"id": "Debian"
"match-pattern": "*Debian*"
"default-absent-tool": "dos2unix"
"distribution2":
"id": "Debian"
"match-pattern": "*Debian*"
"default-absent-tool": "dos2unix"
- "environment": "windows-latest"
"distribution":
"id": "Debian"
"match-pattern": "*Debian*"
"default-absent-tool": "dos2unix"
Expand All @@ -832,7 +879,26 @@ jobs:
"match-pattern": "*Debian*"
"default-absent-tool": "dos2unix"
"include":
- "distribution":
- "environment": "windows-2019"
"distribution":
"id": "Debian"
"match-pattern": "*Debian*"
"default-absent-tool": "dos2unix"
"distribution2":
"id": "Ubuntu-20.04"
"match-pattern": "*Ubuntu*20.04*"
"default-absent-tool": "dos2unix"
- "environment": "windows-2022"
"distribution":
"id": "Debian"
"match-pattern": "*Debian*"
"default-absent-tool": "dos2unix"
"distribution2":
"id": "Ubuntu-20.04"
"match-pattern": "*Ubuntu*20.04*"
"default-absent-tool": "dos2unix"
- "environment": "windows-latest"
"distribution":
"id": "Debian"
"match-pattern": "*Debian*"
"default-absent-tool": "dos2unix"
Expand All @@ -842,9 +908,9 @@ jobs:
"default-absent-tool": "dos2unix"
fail-fast: false
"test_distribution_specific_wsl_bash_scripts":
name: "Test distribution specific wsl-bash scripts ${{ matrix.nothing }}"
name: "Test distribution specific wsl-bash scripts on ${{ matrix.environment }}"
needs: "build"
runs-on: "windows-latest"
runs-on: "${{ matrix.environment }}"
steps:
- name: "Restore built artifacts from cache"
uses: "actions/cache@v2"
Expand Down Expand Up @@ -992,6 +1058,10 @@ jobs:
shell: "wsl-bash_Ubuntu-16.04 {0}"
strategy:
matrix:
"environment":
- "windows-2019"
- "windows-2022"
- "windows-latest"
"distributions":
- "distribution1":
"id": "Debian"
Expand Down

0 comments on commit 9bebe53

Please sign in to comment.