mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
77 lines
1.6 KiB
YAML
77 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
schedule:
|
|
- cron: '0 0 * * 0' # at midnight of each sunday
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
skip-check:
|
|
permissions:
|
|
actions: write
|
|
contents: read
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
|
steps:
|
|
- id: skip_check
|
|
uses: fkirc/skip-duplicate-actions@v5
|
|
with:
|
|
concurrent_skipping: 'same_content_newer'
|
|
cancel_others: true
|
|
paths_ignore: '["*.md"]'
|
|
|
|
develop:
|
|
needs: skip-check
|
|
if: needs.skip-check.outputs.should_skip != 'true'
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Install system dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y \
|
|
libdbus-1-dev \
|
|
libwayland-dev \
|
|
libwebkit2gtk-4.1-dev \
|
|
libxdo-dev
|
|
|
|
- uses: arduino/setup-protoc@v3
|
|
with:
|
|
version: "27.0"
|
|
|
|
- uses: Nugine/setup-flatc@v1
|
|
with:
|
|
version: "24.3.25"
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
with:
|
|
components: rustfmt, clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
with:
|
|
cache-on-failure: true
|
|
|
|
- name: Format
|
|
run: cargo fmt --all --check
|
|
|
|
- name: Lint
|
|
run: cargo check
|
|
# run: cargo clippy
|
|
# run: cargo clippy -- -D warnings
|
|
|
|
- name: Test
|
|
run: cargo test --all --exclude e2e_test
|