Skip to content

Commit

Permalink
workflows: skip basic test for docs
Browse files Browse the repository at this point in the history
The basic test workflow is skipped for changes only in the docs
directory. Because this workflow is required, basic_test_skipped.yaml
is added to run in its absence and provide a successful completion.
  • Loading branch information
flit committed May 30, 2022
1 parent d69422f commit a689e7a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/basic_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,22 @@
# pyocd workflow for:
# - checking code with flake8
# - running unit tests
# - run test/import_all.py script
# - build source distro and wheel, check with twine

name: basic test

on: [push, pull_request]
# Don't run for changes that only affect the docs directory.
on:
push:
paths-ignore:
- 'docs/**'
pull_request:
paths-ignore:
- 'docs/**'

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/basic_test_skipped.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (c) 2021-2022 Chris Reed

# pyocd workflow to fill in for the skipped 'basic test' workflow for docs updates. Without this,
# the required 'basic test' workflow will not have run and therefore docs PRs won't be mergeable.
#
# See this documentation for more about the need for this workaround: https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/troubleshooting-required-status-checks#handling-skipped-but-required-checks

name: basic test

on:
pull_request:
paths:
- 'docs/**'

jobs:
build:
runs-on: ubuntu-latest
steps:
- run: 'echo "Skipped due to path filter."'

0 comments on commit a689e7a

Please sign in to comment.