Skip to content

fix: CI only runs on ubuntu (#5) #93

fix: CI only runs on ubuntu (#5)

fix: CI only runs on ubuntu (#5) #93

Workflow file for this run

name: Test Action
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
test-save:
name: "Test save on ${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Test Save
uses: ./save
with:
path: .github/
# Create a unique key to test intra workflow artifacts.
key: test/stash-${{ matrix.os }}-${{ github.sha }}
retention-days: '1'
- name: Test Overwrite
id: test
uses: ./save
with:
path: .github/
# Create a unique key to test intra workflow artifacts.
key: test/stash-${{ matrix.os }}-${{ github.sha }}
retention-days: '1'
- name: Check Output
shell: bash
env:
ID: ${{ steps.test.outputs.stash-id }}
URL: ${{ steps.test.outputs.stash-url }}
run: |
if [ -z "$ID" -o -z "$URL" ]; then
echo "Output empty"
exit 1
fi
- name: Check if inter-workflow stash exists
id: stash
uses: ./restore
with:
key: test-stash-cross-${{ matrix.os }}
path: test-stash
- name: Save cross-workflow Stash
if: ${{ steps.stash.outputs.stash-hit == 'false' }}
uses: ./save
with:
path: .github/
key: test-stash-cross-${{ matrix.os }}
retention-days: '90'
test-restore:
name: "Test restore on ${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
needs: test-save
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Test intra-workflow stash
uses: ./restore
with:
key: test/stash-${{ matrix.os }}-${{ github.sha }}
path: intra/.github/
- shell: bash
run: ls -laR intra
- name: Test inter-workflow stash
uses: ./restore
with:
key: test-stash-cross-${{ matrix.os }}
path: inter/.github/
- shell: bash
run: ls -laR inter/