diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..57e5ad1 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Run tests + run: cargo test --all -- --test-threads=4 + - name: Run clippy + run: cargo clippy --all -- -D warnings + - name: Check formatting + run: cargo fmt --check --all + + build: + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v4 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Build release + run: cargo build --release + - name: Upload binary + uses: actions/upload-artifact@v4 + with: + name: config-forge + path: target/release/config-forge