diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..95b9b2d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: CI + +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +jobs: + go-cli: + name: Go CLI + runs-on: ubuntu-latest + defaults: + run: + working-directory: cli + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: "1.22" + cache-dependency-path: cli/go.sum + - name: Download dependencies + run: go mod download + - name: Build + run: go build ./... + - name: Test + run: go test -race ./... + - name: Lint + uses: golangci/golangci-lint-action@v6 + with: + working-directory: cli + + rust-gui: + name: Rust GUI + runs-on: ubuntu-latest + defaults: + run: + working-directory: gui + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + - uses: Swatinem/rust-cache@v2 + with: + workspaces: gui + - name: Check formatting + run: cargo fmt --all -- --check + - name: Clippy + run: cargo clippy --all-targets --all-features -- -D warnings + - name: Build + run: cargo build --all-features + - name: Test + run: cargo test --all-features