Skip to content

Commit

Permalink
Merge pull request #4 from MalteHerrmann/add-gh-actions
Browse files Browse the repository at this point in the history
imp(CI): add CI and makefile for unit tests
  • Loading branch information
MalteHerrmann committed Aug 28, 2023
2 parents 01e956b + ddb1efc commit 1ca00e2
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Tests
on:
pull_request:
push:
branches:
- main
- release/**

jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

test-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: '1.20'
check-latest: true
- uses: actions/checkout@v3
- uses: technote-space/[email protected]
with:
PATTERNS: |
**/**.go
go.mod
go.sum
- name: Run Unit Tests
run: |
make test-unit
if: env.GIT_DIFF
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ Ref: https://keepachangelog.com/en/1.0.0/

# Changelog

## Unreleased

### Improvements

- [#4](https://github.com/MalteHerrmann/upgrade-local-node-go/pull/4) add GH actions and Makefile for testing

## [v0.2.0](https://github.com/MalteHerrmann/upgrade-local-node-go/releases/tag/v0.2.0) - 2023-08-09

### Improvements
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
test: test-unit

test-unit:
go test -mod=readonly ./...

0 comments on commit 1ca00e2

Please sign in to comment.