fix select macro not selecting subpaths properly #123
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
# Based on https://github.com/rust-lang/regex/blob/9582040009820380a16819ca0d1ae262c7d454b0/.github/workflows/ci.yml | |
# and https://github.com/Keats/validator/blob/09efa7e78e6fbc853a6a56af6904a00e2e6632b8/.github/workflows/ci.yml | |
name: ci | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
# When a new run is triggered by a commit while a run is already in progress, | |
# we want to cancel the in-progress run so as to not waste CI resources. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
# The section is needed to drop write-all permissions that are granted on | |
# `schedule` event. By specifying any permission explicitly all others are set | |
# to none. By using the principle of least privilege the damage a compromised | |
# workflow can do (because of an injection or compromised third party tool or | |
# action) is restricted. Currently the worklow doesn't need any additional | |
# permission except for pulling the code. Adding labels to issues, commenting | |
# on pull-requests, etc. may need additional permissions: | |
# | |
# Syntax for this section: | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions | |
# | |
# Reference for how to assign permissions on a job-by-job basis: | |
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs | |
# | |
# Reference for available permissions that we can enable if needed: | |
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token | |
permissions: | |
# to fetch code (actions/checkout) | |
contents: read | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
env: | |
CARGO_TERM_COLOR: always | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [pinned, stable, nightly] | |
include: | |
- build: pinned | |
os: ubuntu-20.04 | |
rust: 1.69 | |
# Fails on pinned version because the output changed, | |
# so we're excluding it, but it's still tested on stable and nightly. | |
EXCLUDE_UI_TESTS: "pattern_mismatched_types" | |
- build: stable | |
os: ubuntu-20.04 | |
rust: stable | |
EXCLUDE_UI_TESTS: "" | |
- build: nightly | |
os: ubuntu-20.04 | |
rust: nightly | |
EXCLUDE_UI_TESTS: "" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "rust-${{ matrix.build }}-test" | |
- name: Build xtask | |
run: cargo build --manifest-path ./xtask/Cargo.toml | |
- name: Build docs | |
run: cargo doc --all-features | |
- name: Run tests | |
run: cargo x test | |
env: | |
EXCLUDE_UI_TESTS: ${{ matrix.EXCLUDE_UI_TESTS }} | |
checks: | |
name: Checks | |
runs-on: ubuntu-20.04 | |
env: | |
CARGO_TERM_COLOR: always | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy | |
- name: Install tools | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-deny,cargo-audit,cargo-udeps,cargo-pants | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: "rust-checks" | |
- name: Build xtask | |
run: cargo build --manifest-path ./xtask/Cargo.toml | |
- name: Run checks | |
run: cargo x check | |