mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-24 09:04:19 +02:00
This is required for Result::map_or_else. Additionally, run clippy with 1.41 as well. Otherwise it reports suggestions that are not compatible with 1.41.
69 lines
1.5 KiB
YAML
69 lines
1.5 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
schedule:
|
|
- cron: '30 3 * * 2'
|
|
|
|
name: CI
|
|
|
|
jobs:
|
|
|
|
test:
|
|
name: run tests
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
rust: [1.41.1, stable]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
override: true
|
|
- name: Build with default features
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
- name: Build with all features
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: build
|
|
args: --all-features
|
|
- name: Run tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|
|
args: --all-features
|
|
|
|
clippy:
|
|
name: run clippy lints
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: 1.41.1
|
|
components: clippy
|
|
override: true
|
|
- uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: --all-features
|
|
|
|
fmt:
|
|
name: run rustfmt
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: 1.46.0
|
|
override: true
|
|
- run: rustup component add rustfmt
|
|
- uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|