Skip to content

Commit

Permalink
Merge pull request #79 from korken89/rs/cleanup
Browse files Browse the repository at this point in the history
Cleaning up CI versions
  • Loading branch information
korken89 authored Jul 2, 2024
2 parents 17785ea + d341127 commit 832a366
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 118 deletions.
3 changes: 0 additions & 3 deletions .github/bors.toml

This file was deleted.

106 changes: 39 additions & 67 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
push:
branches:
- master
- staging
- trying

env:
CARGO_TERM_COLOR: always
Expand All @@ -16,95 +14,69 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
run: cargo check

test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
run: cargo test

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true

- name: Install rustfmt
run: rustup component add rustfmt
components: rustfmt

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true

- name: Install clippy
run: rustup component add clippy
components: clippy

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all -- -D warnings

# Refs: https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149
#
# ALL THE PREVIOUS JOBS NEEDS TO BE ADDED TO THE `needs` SECTION OF THIS JOB!

ci-success:
name: ci
if: github.event_name == 'push' && success()
needs:
- check
- test
- fmt
- clippy
run: cargo clippy --all -- -D warnings

docs:
runs-on: ubuntu-latest

steps:
- name: Mark the job as a success
run: exit 0
- uses: actions/checkout@v4

- name: Set up Python 3.x
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.x'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'

# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Install dependencies
run: pip install git+https://github.com/linkchecker/linkchecker.git

- name: Remove cargo-config
run: rm -f .cargo/config

- name: Build docs
run: cargo doc
4 changes: 2 additions & 2 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Check that changelog updated
uses: dangoslen/changelog-enforcer@v3
Expand All @@ -25,4 +25,4 @@ jobs:
skipLabels: 'needs-changelog, skip-changelog'
missingUpdateErrorMessage: 'Please add a changelog entry in the CHANGELOG.md file.'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43 changes: 0 additions & 43 deletions .github/workflows/docs.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.5.1
uses: lycheeverse/lychee-action@v1
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

Expand All @@ -24,4 +24,4 @@ jobs:
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: report, automated issue
labels: report, automated issue

0 comments on commit 832a366

Please sign in to comment.