summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorliv <mokou@fastmail.com>2023-09-04 15:02:14 +0200
committerGitHub <noreply@github.com>2023-09-04 15:02:14 +0200
commitae28d2fa2de620d368d06d62065bbbacf115855d (patch)
tree301ceef251f976c51bb239d92e86932dd6aa10e6 /.github
parent3ad30308ec39dc6f108493fdca7dd133a8b28b8e (diff)
parentde45998f69ac95cd81175fef9e054c2c77ce82ab (diff)
Merge pull request #1665 from rust-lang/chore/better-ci
chore: consolidate CI workflows
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/lint.yml18
-rw-r--r--.github/workflows/rust.yml31
-rw-r--r--.github/workflows/web.yml12
3 files changed, 24 insertions, 37 deletions
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
deleted file mode 100644
index 67339d1..0000000
--- a/.github/workflows/lint.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Lint
-
-on:
- push:
- branches:
- - main
- pull_request:
- branches:
- - main
-
-jobs:
- lint:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: DavidAnson/markdownlint-cli2-action@v9
- with:
- globs: "exercises/**/*.md"
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index 1b244b1..226d413 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -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
diff --git a/.github/workflows/web.yml b/.github/workflows/web.yml
index f20e24e..5d9abe4 100644
--- a/.github/workflows/web.yml
+++ b/.github/workflows/web.yml
@@ -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.
@@ -95,4 +85,4 @@ jobs:
# Gotta tell the action where to find oranda's output
folder: public
token: ${{ secrets.GITHUB_TOKEN }}
- single-commit: true \ No newline at end of file
+ single-commit: true