diff --git a/.github/workflows/judger.yml b/.github/workflows/judger.yml new file mode 100644 index 00000000..9127b1b6 --- /dev/null +++ b/.github/workflows/judger.yml @@ -0,0 +1,40 @@ +name: test and fmt + +on: + push: + branches: + - '*' + +env: + CARGO_TERM_COLOR: always + +jobs: + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + args: --all-features --manifest-path ./judger/Cargo.toml + fmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all-features --manifest-path ./judger/Cargo.toml