diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/build-and-test.yml similarity index 91% rename from .forgejo/workflows/ci.yml rename to .forgejo/workflows/build-and-test.yml index 129fd3e..89c9564 100644 --- a/.forgejo/workflows/ci.yml +++ b/.forgejo/workflows/build-and-test.yml @@ -1,18 +1,15 @@ -name: CI +name: build-and-test on: pull_request: push: - branches: - - main + branches: [main] jobs: - test: - name: Test + build-and-test: runs-on: docker container: image: rust:1.97.1-bookworm - steps: - name: Install Node.js run: | @@ -20,18 +17,13 @@ jobs: apt-get install --yes curl curl --fail --silent --show-error --location https://deb.nodesource.com/setup_24.x | bash - apt-get install --yes nodejs - - name: Check out source uses: https://data.forgejo.org/actions/checkout@v6 - - name: Install Rust components run: rustup component add rustfmt clippy - - name: Check formatting run: cargo fmt --check - - name: Lint run: cargo clippy --all-targets -- -D warnings - - name: Run tests run: cargo test --all-targets diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..246b7b5 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,23 @@ +name: build-and-test + +on: + pull_request: + push: + branches: [main] + +jobs: + build-and-test: + runs-on: ubuntu-latest + container: + image: rust:1.97.1-bookworm + steps: + - name: Check out source + uses: actions/checkout@v6 + - name: Install Rust components + run: rustup component add rustfmt clippy + - name: Check formatting + run: cargo fmt --check + - name: Lint + run: cargo clippy --all-targets -- -D warnings + - name: Run tests + run: cargo test --all-targets diff --git a/.tangled/workflows/build-and-test.yml b/.tangled/workflows/build-and-test.yml new file mode 100644 index 0000000..0d17d56 --- /dev/null +++ b/.tangled/workflows/build-and-test.yml @@ -0,0 +1,20 @@ +when: + - event: [push, pull_request] + branch: [main] + +engine: nixery + +dependencies: + nixpkgs: + - cargo + - rustc + - clippy + - rustfmt + +steps: + - name: Check formatting + command: cargo fmt --check + - name: Lint + command: cargo clippy --all-targets -- -D warnings + - name: Run tests + command: cargo test --all-targets