Skip to content

Commit

Permalink
Remove testing on to-be-removed windows-2016 environment
Browse files Browse the repository at this point in the history
  • Loading branch information
Vampire committed Dec 1, 2021
1 parent 8473878 commit 5b5e26c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 74 deletions.
41 changes: 4 additions & 37 deletions .github/workflows/template/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,13 @@ jobs:
name: Build
runs-on: windows-latest
steps:
- &configure_git
name: Configure Git
- name: Configure Git
run: git config --global core.autocrlf input

- &checkout
name: Checkout
- name: Checkout
uses: actions/checkout@v2

- &build
name: Build
- name: Build
uses: burrunan/gradle-cache-action@v1
with:
arguments: build --info --stacktrace --scan
Expand All @@ -55,42 +52,12 @@ jobs:
- &built_artifacts_cache
name: Save built artifacts to cache
uses: actions/cache@v2
with: &built_artifacts_cache_input
with:
path: |
action.yml
build/distributions/
key: ${{ github.run_id }}

# work-around for https://github.com/actions/cache/issues/301
build_windows_2016:
name: Build on windows-2016
runs-on: windows-2016
steps:
- *configure_git
- *checkout
- *build
- &built_artifacts_cache_windows_2016
<<: *built_artifacts_cache
with:
<<: *built_artifacts_cache_input
key: ${{ github.run_id }}-windows_2016

test_invalid_windows_environment:
name: Test 'windows-2016' environment
needs: build_windows_2016
runs-on: windows-2016
steps:
- name: Restore built artifacts from cache
<<: *built_artifacts_cache_windows_2016

- <<: *execute_action
continue-on-error: true

- name: Test - action should fail if an invalid windows environment is given
shell: cmd
run: |
if '${{ steps.execute_action.outcome }}' NEQ 'failure' exit 1
test_invalid_distribution:
name: Test '${{ matrix.distribution.label }}' distribution
needs: build
Expand Down
37 changes: 0 additions & 37 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,43 +39,6 @@ jobs:
with:
"path": "action.yml\nbuild/distributions/\n"
"key": "${{ github.run_id }}"
"build_windows_2016":
name: "Build on windows-2016"
runs-on: "windows-2016"
steps:
- name: "Configure Git"
run: "git config --global core.autocrlf input"
- name: "Checkout"
uses: "actions/checkout@v2"
- name: "Build"
uses: "burrunan/gradle-cache-action@v1"
with:
"arguments": "build --info --stacktrace --scan"
"debug": "false"
"concurrent": "true"
"gradle-dependencies-cache-key": "buildSrc/**/Versions.kt"
- name: "Save built artifacts to cache"
uses: "actions/cache@v2"
with:
"key": "${{ github.run_id }}-windows_2016"
"path": "action.yml\nbuild/distributions/\n"
"test_invalid_windows_environment":
name: "Test 'windows-2016' environment"
needs: "build_windows_2016"
runs-on: "windows-2016"
steps:
- name: "Restore built artifacts from cache"
uses: "actions/cache@v2"
with:
"key": "${{ github.run_id }}-windows_2016"
"path": "action.yml\nbuild/distributions/\n"
- id: "execute_action"
name: "Execute action"
uses: "./"
continue-on-error: true
- name: "Test - action should fail if an invalid windows environment is given"
run: "if '${{ steps.execute_action.outcome }}' NEQ 'failure' exit 1\n"
shell: "cmd"
"test_invalid_distribution":
name: "Test '${{ matrix.distribution.label }}' distribution"
needs: "build"
Expand Down

0 comments on commit 5b5e26c

Please sign in to comment.