Cache on linux #341
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean install of the dependencies and run tests across different versions | |
# | |
# Replace <track> with the track name | |
# Replace <image-name> with an image to run the jobs on | |
# Replace <action to setup tooling> with a github action to setup tooling on the image | |
# Replace <install dependencies> with a cli command to install the dependencies | |
# | |
# Find Github Actions to setup tooling here: | |
# - https://github.com/actions/?q=setup&type=&language= | |
# - https://github.com/actions/starter-workflows/tree/main/ci | |
# - https://github.com/marketplace?type=actions&query=setup | |
# | |
# Requires scripts: | |
# - bin/test | |
name: COBOL / Test (Windows) | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
ci: | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 | |
- name: Cache GnuCOBOL | |
id: cache-gnu-cobol | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 | |
with: | |
path: | | |
~/gnucobol | |
~/cobolcheck | |
key: gnucobol-3.2.7-cobolcheck-v1 | |
- name: Install GnuCOBOL | |
if: steps.cache-gnu-cobol.outputs.cache-hit != 'true' | |
shell: pwsh | |
run: | | |
$requestOpts = @{ | |
Headers = If ($env:GITHUB_TOKEN) { @{ Authorization = "Bearer ${env:GITHUB_TOKEN}" } } Else { @{ } } | |
MaximumRetryCount = 3 | |
RetryIntervalSec = 1 | |
} | |
Invoke-WebRequest -Uri 'https://www.arnoldtrembley.com/GC32-BDB-SP1-rename-7z-to-exe.7z' -OutFile $HOME\gnucobol-3.2.7z @requestOpts | |
7z x $HOME\gnucobol-3.2.7z -o"${HOME}\gnucobol" -y | |
- name: Install CobolCheck | |
if: steps.cache-gnu-cobol.outputs.cache-hit != 'true' | |
shell: pwsh | |
run: bin/fetch-cobolcheck.ps1 | |
- name: Run tests for all exercises | |
shell: pwsh | |
run: | | |
bin/setup-environment.ps1 | |
bin/test.ps1 |