fork/helix

git clone https://git.julia.blue/fork/helix

Pascal Kutheupdate MSRV to 1.65ccdb1446

23.05
2.6 KiB110 linesraw
1name: Build
2on:
3  pull_request:
4  push:
5    branches:
6      - master
7  merge_group:
8  schedule:
9    - cron: '00 01 * * *'
10
11jobs:
12  check:
13    name: Check (msrv)
14    runs-on: ubuntu-latest
15    steps:
16      - name: Checkout sources
17        uses: actions/checkout@v3
18      - name: Install stable toolchain
19        uses: helix-editor/rust-toolchain@v1
20        with:
21          profile: minimal
22          override: true
23
24      - uses: Swatinem/rust-cache@v2
25
26      - name: Run cargo check
27        run: cargo check
28
29  test:
30    name: Test Suite
31    runs-on: ${{ matrix.os }}
32    env:
33      RUST_BACKTRACE: 1
34      HELIX_LOG_LEVEL: info
35    steps:
36      - name: Checkout sources
37        uses: actions/checkout@v3
38
39      - name: Install stable toolchain
40        uses: dtolnay/rust-toolchain@1.65
41
42      - uses: Swatinem/rust-cache@v2
43
44      - name: Cache test tree-sitter grammar
45        uses: actions/cache@v3
46        with:
47          path: runtime/grammars
48          key: ${{ runner.os }}-stable-v${{ env.CACHE_VERSION }}-tree-sitter-grammars-${{ hashFiles('languages.toml') }}
49          restore-keys: ${{ runner.os }}-stable-v${{ env.CACHE_VERSION }}-tree-sitter-grammars-
50
51      - name: Run cargo test
52        run: cargo test --workspace
53
54      - name: Run cargo integration-test
55        run: cargo integration-test
56
57    strategy:
58      matrix:
59        os: [ubuntu-latest, macos-latest, windows-latest]
60
61  lints:
62    name: Lints
63    runs-on: ubuntu-latest
64    steps:
65      - name: Checkout sources
66        uses: actions/checkout@v3
67
68      - name: Install stable toolchain
69        uses: dtolnay/rust-toolchain@1.65
70        with:
71          components: rustfmt, clippy
72
73      - uses: Swatinem/rust-cache@v2
74
75      - name: Run cargo fmt
76        run: cargo fmt --all --check
77
78      - name: Run cargo clippy
79        run: cargo clippy --workspace --all-targets -- -D warnings
80
81      - name: Run cargo doc
82        run: cargo doc --no-deps --workspace --document-private-items
83        env:
84          RUSTDOCFLAGS: -D warnings
85
86  docs:
87    name: Docs
88    runs-on: ubuntu-latest
89    steps:
90      - name: Checkout sources
91        uses: actions/checkout@v3
92
93      - name: Install stable toolchain
94        uses: dtolnay/rust-toolchain@1.65
95
96      - uses: Swatinem/rust-cache@v2
97
98      - name: Validate queries
99        run: cargo xtask query-check
100
101      - name: Generate docs
102        run: cargo xtask docgen
103
104      - name: Check uncommitted documentation changes
105        run: |
106          git diff
107          git diff-files --quiet \
108            || (echo "Run 'cargo xtask docgen', commit the changes and push again" \
109            && exit 1)
110