special issues testing #454
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
name: Testing special issues | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the main branch | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: {} | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
special-issues: | |
strategy: | |
matrix: | |
os: [ macos, ubuntu, windows] | |
fail-fast: false # Allows to see results from other combinations | |
runs-on: ${{ matrix.os }}-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Set OS-specific variables for Windows | |
if: matrix.os == 'windows' | |
run: | | |
echo "OS_PATH=windows" >> $GITHUB_ENV | |
echo "OS_FILE_EXTENSION=ps1" >> $GITHUB_ENV | |
shell: bash | |
- name: Set OS-specific variables for macOS and Ubuntu | |
if: matrix.os != 'windows' | |
run: | | |
echo "OS_PATH=linux_mac" >> $GITHUB_ENV | |
echo "OS_FILE_EXTENSION=sh" >> $GITHUB_ENV | |
shell: bash | |
- name: Download Special Issues linux | |
id: specialIssues | |
run: ./${{ env.OS_PATH }}/magpi-special-issue-downloader.${{ env.OS_FILE_EXTENSION }} | |
- name: "Check file existence for special issues" | |
id: check_files | |
uses: andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0 | |
with: | |
files: "special_issues/MagPiSE1.pdf, special_issues/Projects_Book_v3.pdf, special_issues/Retro_Gaming.pdf, special_issues/C_and_GUI_Programming_2nd_Edition.pdf" | |
fail: true | |
- name: lslah | |
run: ls -lah special_issues/ | |
shell: bash | |
- name: File exists | |
if: steps.check_files.outputs.files_exists == 'false' | |
run: exit 1 |