diff --git a/mangezmieux-backend/.gitea/workflows/golangci-lint.yml b/mangezmieux-backend/.gitea/workflows/golangci-lint.yml new file mode 100644 index 0000000..ce0f2a2 --- /dev/null +++ b/mangezmieux-backend/.gitea/workflows/golangci-lint.yml @@ -0,0 +1,30 @@ +name: golangci-lint +on: + push: + pull_request: + +permissions: + contents: read + # Optional: allow read access to pull requests. Use with `only-new-issues` option. + # pull-requests: read + +jobs: + golangci: + name: lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # all history for all branches and tags + + - uses: actions/setup-go@v6 + with: + go-version-file: go.mod + check-latest: true + cache: false + + - name: golangci-lint + uses: golangci/golangci-lint-action@v8 + with: + version: v2.3.1 \ No newline at end of file diff --git a/mangezmieux-backend/.gitea/workflows/test.yml b/mangezmieux-backend/.gitea/workflows/test.yml new file mode 100644 index 0000000..a29633e --- /dev/null +++ b/mangezmieux-backend/.gitea/workflows/test.yml @@ -0,0 +1,27 @@ +name: Test + +on: + push: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # all history for all branches and tags + + - uses: actions/setup-go@v6 + with: + go-version-file: go.mod + check-latest: true + cache: false + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y make + + - name: Run make check-all + run: make test \ No newline at end of file diff --git a/mangezmieux-backend/.github/workflows/build.yaml b/mangezmieux-backend/.github/workflows/build.yaml deleted file mode 100644 index a1f7538..0000000 --- a/mangezmieux-backend/.github/workflows/build.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: Build - -on: - workflow_dispatch: - push: - branches: - - '**' -jobs: - build: - runs-on: ubuntu-latest - env: - GOPRIVATE: github.com/kratisto - GONOSUMDB: "*github.com/kratisto/mangezmieux-backend" - steps: - - uses: actions/checkout@v3 - - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.GHA_TOKEN_PAT }} - run: git config --global url."https://YOUR_GITHUB_USERNAME:${TOKEN}@github.com".insteadOf "https://github.com" - - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.21' - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... diff --git a/mangezmieux-backend/.github/workflows/release.yaml b/mangezmieux-backend/.github/workflows/release.yaml deleted file mode 100644 index f9e8552..0000000 --- a/mangezmieux-backend/.github/workflows/release.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Release - -on: - workflow_dispatch: - push: - branches: - - 'main' -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Semantic Release - id: semantic # Need an `id` for output variables - uses: cycjimmy/semantic-release-action@v4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: rickstaa/action-create-tag@v1 - id: "tag_create" - with: - tag: "pkg/client/v${{ steps.semantic.outputs.new_release_version }}"