diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..74280d4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: Go Build and Release + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +jobs: + test: + name: Run tests + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version-file: ./go.mod + + - name: Run tests + run: go test -v ./... diff --git a/.github/workflows/go.yml b/.github/workflows/release.yml similarity index 98% rename from .github/workflows/go.yml rename to .github/workflows/release.yml index 0e255c8..3726e58 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,6 @@ on: branches: ["main"] tags: - "v*" - pull_request: - branches: ["main"] jobs: test: