From 3008f58ab3bd50f3b99094dc8507f67fa8026591 Mon Sep 17 00:00:00 2001 From: severindellsperger Date: Thu, 11 Jul 2024 13:13:39 +0200 Subject: [PATCH] add testing workflow --- .github/workflows/testing.yaml | 25 +++++++++++++++++++++++++ .gitignore | 17 +++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .github/workflows/testing.yaml diff --git a/.github/workflows/testing.yaml b/.github/workflows/testing.yaml new file mode 100644 index 0000000..a1e8f9f --- /dev/null +++ b/.github/workflows/testing.yaml @@ -0,0 +1,25 @@ +name: Go Tests + +on: + pull_request: {} + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: '1.21.x' + - name: Install dependencies + run: go mod tidy + - name: Test Go Source Code with Coverage + run: go test ./... -race -coverprofile=coverage.out -covermode=atomic + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 3b735ec..14b506a 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,20 @@ # Go workspace file go.work + +# Binary folder +bin/ + +# png folder +png/ + +# +test/uml + + +## VS Code +.vscode/ + + +## Debug +__debug* \ No newline at end of file