From 9eabac2639ae39bafe41dd7c158fe36dc64deabe Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Tue, 18 Jun 2024 18:20:20 +0700 Subject: [PATCH] ci: separate `ci` workflow into `check` and `test` workflows --- .github/workflows/check.yaml | 23 +++++++++++++++++++++++ .github/workflows/{ci.yaml => test.yaml} | 21 ++------------------- 2 files changed, 25 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/check.yaml rename .github/workflows/{ci.yaml => test.yaml} (62%) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml new file mode 100644 index 0000000..e96d9c7 --- /dev/null +++ b/.github/workflows/check.yaml @@ -0,0 +1,23 @@ +name: Check +on: + workflow_dispatch: + pull_request: + push: + branches: [main] +jobs: + check-packages: + name: Check Packages + runs-on: ubuntu-latest + steps: + - name: Check Out + uses: actions/checkout@v4.1.7 + + - name: Setup Go + uses: actions/setup-go@v5.0.1 + with: + go-version: stable + + - name: Check Formatting + run: | + go fmt ./... + git diff --exit-code HEAD diff --git a/.github/workflows/ci.yaml b/.github/workflows/test.yaml similarity index 62% rename from .github/workflows/ci.yaml rename to .github/workflows/test.yaml index 7c51407..1ee63ee 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/test.yaml @@ -1,32 +1,15 @@ -name: CI +name: Test on: workflow_dispatch: pull_request: push: branches: [main] jobs: - check-packages: - name: Check Packages - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4.1.7 - - - name: Setup Go - uses: actions/setup-go@v5.0.1 - with: - go-version: stable - - - name: Check Formatting - run: | - go fmt ./... - git diff --exit-code HEAD - test-packages: name: Test Packages runs-on: ubuntu-latest steps: - - name: Checkout + - name: Check Out uses: actions/checkout@v4.1.7 - name: Setup Go