mirror of
https://github.com/deps-rs/deps.rs.git
synced 2024-11-22 10:26:30 +00:00
45 lines
946 B
YAML
45 lines
946 B
YAML
name: Premerge
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: 0 0 1 * *
|
|
|
|
jobs:
|
|
build-and-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout source
|
|
uses: actions/checkout@v3
|
|
|
|
- name: install Rust
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1.4.3
|
|
|
|
- name: check
|
|
run: cargo check
|
|
|
|
- name: test
|
|
run: cargo test
|
|
|
|
linting:
|
|
if: ${{ github.ref != 'main' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: checkout source
|
|
uses: actions/checkout@v3
|
|
|
|
- name: install Rust
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1.4.3
|
|
with: { components: rustfmt, clippy }
|
|
|
|
- name: format
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: clippy
|
|
uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
args: -- -D warnings
|