-
Notifications
You must be signed in to change notification settings - Fork 32
73 lines (70 loc) · 1.89 KB
/
sqlformat.yml
File metadata and controls
73 lines (70 loc) · 1.89 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: sqlformat
permissions:
contents: read
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build-test-unix:
runs-on: ubuntu-latest
strategy:
matrix:
conf:
- minimum
- latest-stable
- latest-beta
- latest-nightly
include:
- conf: minimum
toolchain: 1.84.0
- conf: latest-stable
toolchain: stable
- conf: latest-beta
toolchain: beta
- conf: latest-nightly
toolchain: nightly
steps:
- uses: actions/checkout@v5
- name: Install ${{ matrix.toolchain }}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
- uses: Swatinem/rust-cache@v2
- name: Run rustfmt
if: matrix.toolchain == 'stable'
run: |
cargo fmt --all -- --check
- name: Run clippy
if: matrix.toolchain == 'stable'
uses: actions-rs-plus/clippy-check@v2.4.2
with:
args: --all -- -D warnings
- name: Run tests
run: cargo test
- name: Build docs
run: cargo doc --no-deps
code-coverage:
needs: [build-test-unix]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install stable
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --codecov --output-path codecov.json --ignore-filename-regex tests\.rs
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: codecov.json
fail_ci_if_error: false