Skip to content

Commit

Permalink
feat(WIP): rewrite it in Rust
Browse files Browse the repository at this point in the history
firefox works, chrome still buggy
  • Loading branch information
michaeladler committed Jun 25, 2024
1 parent e02ec02 commit 9d5a930
Show file tree
Hide file tree
Showing 151 changed files with 3,377 additions and 84,392 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ updates:
schedule:
interval: "monthly"

- package-ecosystem: "gomod"
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "monthly"
53 changes: 22 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,40 @@ on: [push, pull_request, workflow_dispatch]
jobs:

build:
name: cargo build
runs-on: ubuntu-latest
name: Build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: build
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: latest
args: build --clean --snapshot
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo build

test:
name: cargo test
runs-on: ubuntu-latest
name: Test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- name: Run coverage
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test --all-features

formatting:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Ensure rustfmt is installed and setup problem matcher
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.out
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1

lint:
name: cargo clippy
runs-on: ubuntu-latest
name: Lint
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: stable
- uses: dominikh/[email protected]
with:
install-go: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
# Ensure rustfmt is installed and setup problem matcher
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
version: latest
skip-cache: true
components: clippy
- run: cargo clippy
22 changes: 22 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Coverage

on: [pull_request, push]

jobs:
coverage:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
*.cov
dist/
result


# Added by cargo

/target
Loading

0 comments on commit 9d5a930

Please sign in to comment.