cargo update #29
This file contains hidden or 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
name: Continuous Integration | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: ["**"] | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install fontconfig and pkg-config | |
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev pkg-config | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Run cargo check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [beta, stable, windows, macos] | |
include: | |
- build: macos | |
os: macos-latest | |
rust: stable | |
- build: windows | |
os: windows-latest | |
rust: stable | |
- build: beta | |
os: ubuntu-latest | |
rust: beta | |
- build: stable | |
os: ubuntu-latest | |
rust: stable | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Install fontconfig on Ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev pkg-config | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --no-fail-fast | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install fontconfig and pkg-config | |
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev pkg-config | |
- name: Install cargo-tarpaulin | |
uses: actions-rs/install@v0.1 | |
with: | |
crate: cargo-tarpaulin | |
version: latest | |
use-tool-cache: true | |
- name: Run cargo-tarpaulin | |
run: cargo tarpaulin --all-features --timeout 600 --out Xml -- --test-threads 1 | |
- name: Upload coverage to codecov | |
uses: codecov/codecov-action@v5 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
verbose: true | |
fail_ci_if_error: true | |
lints: | |
name: Lints | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install fontconfig and pkg-config | |
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev pkg-config | |
- name: Install stable toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Run cargo clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
minimum_rust_version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install fontconfig and pkg-config | |
run: sudo apt-get update && sudo apt-get install -y libfontconfig1-dev pkg-config | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.82.0 | |
override: true | |
- name: Run tests | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features --no-fail-fast |