From db260dd8ce30edfca228abca429901d3af8a0633 Mon Sep 17 00:00:00 2001 From: Dadepo Aderemi <272535+dadepo@users.noreply.github.com> Date: Mon, 11 Nov 2024 19:14:21 +0700 Subject: [PATCH] Add github ci action --- .github/workflows/ci.yaml | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ci.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..095f07b --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,42 @@ +name: ci + +on: + push: + branches: + - main + pull_request: + branches: + - main + +env: + CARGO_TERM_COLOR: always + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: setup-zig + uses: mlugg/setup-zig@v1 + with: + version: 0.13.0 + + - name: lint + run: | + zig fmt --check src/ build.zig build.zig.zon + + test: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + + - name: setup-zig + uses: mlugg/setup-zig@v1 + with: + version: 0.13.0 + + - name: build + run: zig build test \ No newline at end of file