From b62be9eb4666635f78d1d3de455738c5b1902dbd Mon Sep 17 00:00:00 2001 From: bdular Date: Wed, 10 Apr 2024 21:05:13 +0200 Subject: [PATCH] Added CI/CD --- .github/CODEOWNERS | 1 + .github/workflows/test.yaml | 50 +++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/workflows/test.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..2fa182e --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @xBlaz3kx \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..c866991 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,50 @@ +name: "Lint and test" +on: + push: + branches: + - master + paths-ignore: + - 'docs/**' + - '.run/**' + - 'api/**' + - 'features/**' + - 'config/**' + - 'deployments/**' + - '*.md' + tags: + - v* + + pull_request: + types: [ opened, synchronize ] + branches: + - master + paths-ignore: + - 'docs/**' + - '.run/**' + - 'api/**' + - 'features/**' + - 'config/**' + - 'deployments/**' + - '*.md' + + workflow_dispatch: + +jobs: + + # Run unit tests + tests: + name: "Run unit tests" + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: 1.21.1 + + - name: Install dependencies and run tests + run: | + go mod download + go test -v ./... \ No newline at end of file