Skip to content

Commit ae28d2f

Browse files
Merge pull request #1665 from rust-lang/chore/better-ci
chore: consolidate CI workflows
2 parents 3ad3030 + de45998 commit ae28d2f

File tree

5 files changed

+24
-70
lines changed

5 files changed

+24
-70
lines changed

Diff for: .github/workflows/lint.yml

-18
This file was deleted.

Diff for: .github/workflows/rust.yml

+23-8
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,28 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
build:
13+
fmt:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
17-
- name: Fetch & maybe update Cargo.lock
18-
run: cargo fetch --locked
19-
- name: Build
20-
run: cargo build --verbose
21-
- name: Run tests
22-
run: cargo test --verbose
16+
- uses: actions/checkout@v3
17+
- uses: dtolnay/rust-toolchain@stable
18+
with:
19+
components: rustfmt
20+
- uses: DavidAnson/markdownlint-cli2-action@v9
21+
with:
22+
globs: "exercises/**/*.md"
23+
- name: Run cargo fmt
24+
run: |
25+
cargo fmt --all -- --check
26+
test:
27+
runs-on: ${{ matrix.os }}
28+
strategy:
29+
matrix:
30+
os: [ubuntu-latest, windows-latest, macOS-latest]
31+
steps:
32+
- uses: actions/checkout@v3
33+
- uses: dtolnay/rust-toolchain@stable
34+
- uses: swatinem/rust-cache@v2
35+
- name: Run cargo test
36+
run: |
37+
cargo test

Diff for: .github/workflows/web.yml

+1-11
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,7 @@ jobs:
6868
run: |
6969
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/oranda/releases/download/v0.3.1/oranda-installer.sh | sh
7070
oranda build
71-
72-
- name: Prepare HTML for link checking
73-
# untitaker/hyperlink supports no site prefixes, move entire site into
74-
# a subfolder
75-
run: mkdir /tmp/public/ && cp -R public /tmp/public/oranda
7671
77-
- name: Check HTML for broken internal links
78-
uses: untitaker/[email protected]
79-
with:
80-
args: /tmp/public/ --sources docs/
81-
8272
# Deploy to our gh-pages branch (creating it if it doesn't exist)
8373
# the "public" dir that oranda made above will become the root dir
8474
# of this branch.
@@ -95,4 +85,4 @@ jobs:
9585
# Gotta tell the action where to find oranda's output
9686
folder: public
9787
token: ${{ secrets.GITHUB_TOKEN }}
98-
single-commit: true
88+
single-commit: true

Diff for: Cargo.lock

-32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ authors = [
99
edition = "2021"
1010

1111
[dependencies]
12-
argh = "0.1"
1312
indicatif = "0.17.6"
1413
console = "0.15"
1514
notify = "4.0"

0 commit comments

Comments
 (0)