ratatui/.github/workflows/ci.yml
Orhun Parmaksız 66eb0e42fe
chore(ci): Change the target branch to main (#79)
Co-authored-by: Leon Sautour <leon@sautour.net>
2023-03-01 11:06:14 +01:00

63 lines
1.8 KiB
YAML

on:
push:
branches:
- main
pull_request:
branches:
- main
name: CI
env:
CI_CARGO_MAKE_VERSION: 0.35.16
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
rust: ["1.59.0", "stable"]
include:
- os: ubuntu-latest
cargo_make_path: ~/.cargo/bin/cargo-make
- os: windows-latest
cargo_make_path: ~\.cargo\bin\cargo-make.exe
- os: macos-latest
cargo_make_path: ~/.cargo/bin/cargo-make
runs-on: ${{ matrix.os }}
steps:
- uses: hecrj/setup-rust-action@50a120e4d34903c2c1383dec0e9b1d349a9cc2b1
with:
rust-version: ${{ matrix.rust }}
components: rustfmt,clippy
- uses: actions/checkout@v3
- name: "Cache cargo make"
id: cache-cargo-make
uses: actions/cache@v3
with:
path: ${{ matrix.cargo_make_path }}
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-make-${{ env.CI_CARGO_MAKE_VERSION }}
- name: "Install cargo-make"
if: steps.cache-cargo-make.outputs.cache-hit != 'true'
run: cargo install cargo-make --version ${{ env.CI_CARGO_MAKE_VERSION }}
- name: "Format / Build / Test"
run: cargo make ci
env:
RUST_BACKTRACE: full
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
if: github.event_name != 'pull_request'
uses: actions/checkout@v3
- name: Checkout
if: github.event_name == 'pull_request'
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: "Check conventional commits"
uses: crate-ci/committed@master
with:
args: "-vv"
commits: "HEAD"