Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #23 from skyf0l/refactor
Browse files Browse the repository at this point in the history
refactor: core & modules
  • Loading branch information
skyf0l committed Jun 8, 2023
2 parents 3ff4c87 + e7e54c3 commit dccfe23
Show file tree
Hide file tree
Showing 24 changed files with 1,636 additions and 1,943 deletions.
124 changes: 68 additions & 56 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,90 +9,102 @@ on:
env:
RUST_BACKTRACE: 1

# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: |-
${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
linux:
name: Linux
ci:
name: CI
runs-on: ubuntu-latest
strategy:
matrix:
version:
- stable
- beta
- nightly
target:
- x86_64-unknown-linux-gnu
- x86_64-unknown-linux-musl
fail-fast: false
timeout-minutes: 30

steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v3
- name: Stable with rustfmt and clippy
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}
override: true
components: rustfmt
profile: minimal
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest

- name: clean
run: cargo clean
- name: Check coding style
run: cargo fmt --check --all

- name: build
- name: Lint
run: cargo clippy --all-targets -- -D warnings

- name: Build
run: cargo build

- name: test
run: cargo test
- name: Test
run: cargo nextest run

coverage:
name: Coverage
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v3
- name: Stable with rustfmt and clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo install cargo-tarpaulin

- name: ignored test
run: cargo test -- --ignored || true
if: matrix.version == 'nightly'
- name: Test
run: cargo tarpaulin --out Xml

- name: check formatting
run: cargo fmt -- --check
- name: Upload to codecov.io
run: |
curl -Os https://uploader.codecov.io/latest/linux/codecov
chmod +x codecov
./codecov
windows:
name: Windows
name: Build on Windows
runs-on: windows-latest
strategy:
matrix:
version:
- nightly
target:
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
fail-fast: false
timeout-minutes: 30

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}
override: true
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest

- name: build
- name: Build
run: cargo build

- name: test
run: cargo test -- || true
- name: Test
run: cargo nextest run

mac:
name: MacOs
name: Build on MacOs
runs-on: macos-latest
strategy:
matrix:
version:
- nightly
target:
- x86_64-apple-darwin
fail-fast: false
timeout-minutes: 30

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.version }}
override: true
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v2
- uses: taiki-e/install-action@nextest

- name: build
- name: Build
run: cargo build

- name: test
run: cargo test -- || true
- name: Test
run: cargo nextest run
25 changes: 0 additions & 25 deletions .github/workflows/coverage.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

Expand Down
Loading

0 comments on commit dccfe23

Please sign in to comment.