From f31a18429b051c265a3ffcdc1888dd4053e6a572 Mon Sep 17 00:00:00 2001 From: liv Date: Mon, 4 Sep 2023 14:57:16 +0200 Subject: [PATCH 1/3] chore: consolidate CI workflows --- .github/workflows/lint.yml | 18 ------------------ .github/workflows/rust.yml | 31 +++++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 26 deletions(-) delete mode 100644 .github/workflows/lint.yml 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 From 0d36050b364a2dfa342d4c00f820e67c38738726 Mon Sep 17 00:00:00 2001 From: liv Date: Mon, 4 Sep 2023 14:58:13 +0200 Subject: [PATCH 2/3] chore: remove link checker --- .github/workflows/web.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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 From de45998f69ac95cd81175fef9e054c2c77ce82ab Mon Sep 17 00:00:00 2001 From: liv Date: Mon, 4 Sep 2023 15:02:02 +0200 Subject: [PATCH 3/3] chore: remove argh --- Cargo.lock | 32 -------------------------------- Cargo.toml | 1 - 2 files changed, 33 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e5b8553..f7c7a86 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,37 +59,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "argh" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7af5ba06967ff7214ce4c7419c7d185be7ecd6cc4965a8f6e1d8ce0398aad219" -dependencies = [ - "argh_derive", - "argh_shared", -] - -[[package]] -name = "argh_derive" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56df0aeedf6b7a2fc67d06db35b09684c3e8da0c95f8f27685cb17e08413d87a" -dependencies = [ - "argh_shared", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "argh_shared" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5693f39141bda5760ecc4111ab08da40565d1771038c4a0250f03457ec707531" -dependencies = [ - "serde", -] - [[package]] name = "assert_cmd" version = "2.0.12" @@ -618,7 +587,6 @@ checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" name = "rustlings" version = "5.5.1" dependencies = [ - "argh", "assert_cmd", "clap", "console", diff --git a/Cargo.toml b/Cargo.toml index 2c2a92b..85017f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,6 @@ authors = [ edition = "2021" [dependencies] -argh = "0.1" indicatif = "0.17.6" console = "0.15" notify = "4.0"