-
Notifications
You must be signed in to change notification settings - Fork 294
117 lines (110 loc) · 3.44 KB
/
rtx.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: rtx
on:
push:
tags: ["v*"]
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RTX_TRUSTED_CONFIG_PATHS: ${{ github.workspace }}
jobs:
unit:
runs-on: ubuntu-latest
#container: ghcr.io/jdx/rtx:github-actions
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: Swatinem/rust-cache@v2
with:
shared-key: unit
save-if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
- uses: taiki-e/install-action@v2
with:
tool: nextest,just,cargo-deny,cargo-msrv,cargo-machete
- name: Install direnv/shfmt
run: sudo apt-get update; sudo apt-get install direnv shfmt
- run: npm i -g markdown-magic prettier markdownlint-cli
- run: cargo nextest run --all-features
env:
RUST_BACKTRACE: "1"
- run: cargo deny check
- run: cargo msrv verify
- run: cargo machete --with-metadata
- run: just render-all lint-fix
- if: github.event_name == 'pull_request'
uses: EndBug/add-and-commit@v9
with:
push: true
author_name: rtx[bot]
author_email: [email protected]
- run: just lint
coverage:
name: coverage-${{matrix.tranche}}
#container: ghcr.io/jdx/rtx:github-actions
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
tranche: [0, 1, 2, 3]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
#- run: rustup toolchain install nightly --component llvm-tools-preview --profile minimal
- uses: Swatinem/rust-cache@v2
with:
shared-key: coverage
save-if: ${{ github.event_name == 'push' && github.ref_name == 'main' }}
cache-all-crates: true
- run: sudo apt-get update; sudo apt-get install zsh fish direnv shfmt
- run: npm i -g markdown-magic
- uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov,just
- name: Test w/ coverage
uses: nick-fields/retry@v2
env:
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUST_BACKTRACE: "1"
RTX_GITHUB_BOT_TOKEN: ${{ secrets.RTX_GITHUB_BOT_TOKEN }}
TEST_TRANCHE: ${{matrix.tranche}}
TEST_TRANCHE_COUNT: 4
with:
timeout_minutes: 30
max_attempts: 2
command: just test-coverage
- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: false
files: lcov.info
# super-linter:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: read
# statuses: write
# steps:
# - name: Checkout Code
# uses: actions/checkout@v3
# with:
# # Full git history is needed to get a proper
# # list of changed files within `super-linter`
# fetch-depth: 0
#
# - name: Lint Code Base
# uses: super-linter/super-linter@v5
# env:
# VALIDATE_ALL_CODEBASE: false
# DEFAULT_BRANCH: main
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}