Skip to content

Commit

Permalink
Merge pull request #1665 from rust-lang/chore/better-ci
Browse files Browse the repository at this point in the history
chore: consolidate CI workflows
  • Loading branch information
shadows-withal committed Sep 4, 2023
2 parents 3ad3030 + de45998 commit ae28d2f
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 70 deletions.
18 changes: 0 additions & 18 deletions .github/workflows/lint.yml

This file was deleted.

31 changes: 23 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,28 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch & maybe update Cargo.lock
run: cargo fetch --locked
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: DavidAnson/markdownlint-cli2-action@v9
with:
globs: "exercises/**/*.md"
- name: Run cargo fmt
run: |
cargo fmt --all -- --check
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
- name: Run cargo test
run: |
cargo test
12 changes: 1 addition & 11 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,7 @@ jobs:
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/oranda/releases/download/v0.3.1/oranda-installer.sh | sh
oranda build
- name: Prepare HTML for link checking
# untitaker/hyperlink supports no site prefixes, move entire site into
# a subfolder
run: mkdir /tmp/public/ && cp -R public /tmp/public/oranda
- name: Check HTML for broken internal links
uses: untitaker/hyperlink@0.1.29
with:
args: /tmp/public/ --sources docs/

# Deploy to our gh-pages branch (creating it if it doesn't exist)
# the "public" dir that oranda made above will become the root dir
# of this branch.
Expand All @@ -95,4 +85,4 @@ jobs:
# Gotta tell the action where to find oranda's output
folder: public
token: ${{ secrets.GITHUB_TOKEN }}
single-commit: true
single-commit: true
32 changes: 0 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ authors = [
edition = "2021"

[dependencies]
argh = "0.1"
indicatif = "0.17.6"
console = "0.15"
notify = "4.0"
Expand Down

0 comments on commit ae28d2f

Please sign in to comment.