Skip to content

Commit

Permalink
ci(spread): run docs tests if docs are changed
Browse files Browse the repository at this point in the history
  • Loading branch information
tigarmo committed Jan 31, 2025
1 parent 2e4a07b commit 5c1c908
Showing 1 changed file with 40 additions and 4 deletions.
44 changes: 40 additions & 4 deletions .github/workflows/spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,36 @@ jobs:
name: snap
path: ${{ steps.rockcraft.outputs.snap }}

snap-tests:
# snap-tests:
# runs-on: [self-hosted, spread-installed]
# needs: [snap-build]
#
# steps:
# - name: Cleanup job workspace
# run: |
# rm -rf "${{ github.workspace }}"
# mkdir "${{ github.workspace }}"
# - name: Checkout rockcraft
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# submodules: true
# - name: Download snap artifact
# uses: actions/download-artifact@v4
# with:
# name: snap
# path: tests
# - name: Run spread
# run: spread
#
# - name: Discard spread workers
# if: always()
# run: |
# shopt -s nullglob
# for r in .spread-reuse.*.yaml; do
# spread -discard -reuse-pid="$(echo "$r" | grep -o -E '[0-9]+')"
# done
docs-tests:
runs-on: [self-hosted, spread-installed]
needs: [snap-build]

Expand All @@ -38,14 +67,21 @@ jobs:
with:
fetch-depth: 0
submodules: true
- name: Check if docs are changed
uses: dorny/paths-filter@v3
id: changes
with:
filters: |
docs:
- 'docs/**'
- name: Download snap artifact
if: steps.changes.outputs.docs == 'true'
uses: actions/download-artifact@v4
with:
name: snap
path: tests
- name: Run spread
run: spread

- name: Run docs spread tests
run: spread docs/
- name: Discard spread workers
if: always()
run: |
Expand Down

0 comments on commit 5c1c908

Please sign in to comment.