-
Notifications
You must be signed in to change notification settings - Fork 13
57 lines (45 loc) · 1.46 KB
/
pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright (c) the JPEG XL Project Authors. All rights reserved.
#
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Workflow to run pull-requests specific checks.
name: PR
on:
pull_request:
types: [opened, reopened, synchronize]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
# Run source tests: author list, copyright notice and merge conflicts.
authors:
runs-on: [ubuntu-latest]
steps:
- name: Checkout the source
uses: actions/checkout@v4
- name: Check AUTHORS file
run:
./ci/pull_request_checks.sh
rust:
name: Test, Format and Clippy
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install latest rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Build artefact caching
uses: Swatinem/[email protected]
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --release --all-targets --all-features --tests --all -- -D warnings
- name: Clippy with default features
run: cargo clippy --release --all-targets --tests --all -- -D warnings
- name: Run tests
run: cargo test --release --all --no-fail-fast --all-features
- name: Run tests with default features
run: cargo test --release --all --no-fail-fast