ci: add skip based on file changes for Cirrus tests (#859)

* ci: add skip based on file changes for Cirrus tests
This commit is contained in:
Clement Tsang 2022-10-29 05:37:45 -04:00 committed by GitHub
parent 568c48eb5f
commit e3ced72c2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -1,7 +1,7 @@
%YAML 1.1
---
# Configuration for CirrusCI. This is primarily used for
# FreeBSD and macOS M1 tests and builds.
# Configuration for CirrusCI. This is primarily used for testing and building FreeBSD and macOS M1, since other
# CI platforms don't seem to support these platforms as of writing.
#
# We set the YAML directive above to prevent some linting errors around the
# templates.
@ -42,6 +42,7 @@ env:
test_task:
auto_cancellation: false
only_if: $CIRRUS_BUILD_SOURCE != "api" && ($CIRRUS_BRANCH == "master" || $CIRRUS_PR != "")
skip: "!changesInclude('.cargo/**', '.cirrus.yml', 'sample_configs/**', 'src/**', 'tests/**', 'build.rs', 'Cargo.lock', 'Cargo.toml', 'clippy.toml', 'rustfmt.toml')"
matrix:
- name: "FreeBSD 13 Test"
freebsd_instance:

View file

@ -40,7 +40,7 @@ jobs:
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
with:
skip_after_successful_duplicate: "true"
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml"]'
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml", "Cross.toml"]'
do_not_skip: '["workflow_dispatch", "push"]'
# Runs rustfmt + tests + clippy on the main supported platforms.