Skip to content

Commit 5617acb

Browse files
committed
fixup! build(workflows): execute the CI via GitHub Actions
1 parent 71fd271 commit 5617acb

File tree

5 files changed

+38
-30
lines changed

5 files changed

+38
-30
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -33,36 +33,36 @@ jobs:
3333
popd > /dev/null
3434
done | jq --raw-input --slurp 'split("\n")' | jq --compact-output 'map(select(length > 0))' >> $GITHUB_OUTPUT
3535
36-
linter-pull-request:
37-
needs: detect-modules
38-
name: golangci-lint on a PR or from a tag
39-
runs-on: ubuntu-22.04
40-
strategy:
41-
matrix:
42-
modules: ${{ fromJSON(needs.detect-modules.outputs.modules) }}
43-
if: github.ref != 'refs/heads/master'
44-
steps:
45-
- uses: actions/checkout@v4
46-
with:
47-
# We need to define the fetch-depth to 0 so that we can get the commit ID of the master branch
48-
fetch-depth: 0
49-
- uses: actions/setup-go@v5
50-
with:
51-
go-version: stable
52-
check-latest: true
53-
- name: Get golangci-lint configuration file
54-
run: wget --output-document=$(pwd)/.golangci.yml https://sc-devtools.s3.eu-west-1.amazonaws.com/golang-ci/golangci.yml
55-
- name: Get master branch commit ID
56-
id: new-from-rev
57-
run: echo "NEW_FROM_REV=$( git rev-parse origin/master )" >> "$GITHUB_OUTPUT"
58-
- name: "Execute golangci-lint on a pull request"
59-
uses: golangci/golangci-lint-action@v8
60-
with:
61-
working-directory: ${{ matrix.modules }}
62-
# The `only-new-issues` flag is not working (https://github.com/golangci/golangci-lint-action/issues/531).
63-
# We rather decided to use the suggestion from the FAQ (https://golangci-lint.run/welcome/faq/#how-to-integrate-golangci-lint-into-large-project-with-thousands-of-issues) and use `--new-from-rev`
64-
# only-new-issues: false
65-
args: "--config=$(pwd)/../.golangci.yml --new-from-rev=${{ steps.new-from-rev.outputs.NEW_FROM_REV }} --modules-download-mode=mod"
36+
# linter-pull-request:
37+
# needs: detect-modules
38+
# name: golangci-lint on a PR or from a tag
39+
# runs-on: ubuntu-22.04
40+
# strategy:
41+
# matrix:
42+
# modules: ${{ fromJSON(needs.detect-modules.outputs.modules) }}
43+
# if: github.ref != 'refs/heads/master'
44+
# steps:
45+
# - uses: actions/checkout@v4
46+
# with:
47+
# # We need to define the fetch-depth to 0 so that we can get the commit ID of the master branch
48+
# fetch-depth: 0
49+
# - uses: actions/setup-go@v5
50+
# with:
51+
# go-version: stable
52+
# check-latest: true
53+
# - name: Get golangci-lint configuration file
54+
# run: wget --output-document=$(pwd)/.golangci.yml https://sc-devtools.s3.eu-west-1.amazonaws.com/golang-ci/golangci.yml
55+
# - name: Get master branch commit ID
56+
# id: new-from-rev
57+
# run: echo "NEW_FROM_REV=$( git rev-parse origin/master )" >> "$GITHUB_OUTPUT"
58+
# - name: "Execute golangci-lint on a pull request"
59+
# uses: golangci/golangci-lint-action@v8
60+
# with:
61+
# working-directory: ${{ matrix.modules }}
62+
# # The `only-new-issues` flag is not working (https://github.com/golangci/golangci-lint-action/issues/531).
63+
# # We rather decided to use the suggestion from the FAQ (https://golangci-lint.run/welcome/faq/#how-to-integrate-golangci-lint-into-large-project-with-thousands-of-issues) and use `--new-from-rev`
64+
# # only-new-issues: false
65+
# args: "--config=$(pwd)/../.golangci.yml --new-from-rev=${{ steps.new-from-rev.outputs.NEW_FROM_REV }} --modules-download-mode=mod"
6666

6767

6868
tests:

mongo/document/base_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package document
22

33
import (
44
"context"
5+
"fmt"
56
"testing"
67

78
"gopkg.in/mgo.v2/bson"
@@ -32,6 +33,7 @@ func NewTestDocWithData(t *testing.T, data int) (*Doc, func()) {
3233
}
3334

3435
func TestBase_Save(t *testing.T) {
36+
fmt.Println("SAVE")
3537
examples := []struct {
3638
Name string
3739
Doc func(t *testing.T) (*Doc, func())

mongo/document/document_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package document
22

33
import (
44
"context"
5+
"fmt"
56
"testing"
67

78
"github.com/stretchr/testify/assert"
@@ -58,6 +59,7 @@ func buildValidatedWithInternalErrorDocument(valid bool, internalError string) *
5859
}
5960

6061
func TestDocument_Create(t *testing.T) {
62+
fmt.Println("CREATYE")
6163
t.Cleanup(func() {
6264
coll := mongo.Session(logger.Default()).Clone().DB("").C(testDocuments)
6365
err := coll.DropCollection()

mongo/document/paranoid_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package document
22

33
import (
44
"context"
5+
"fmt"
56
"testing"
67
"time"
78

@@ -26,6 +27,7 @@ func NewTestParanoidDoc(t *testing.T) (*ParanoidDoc, func()) {
2627
}
2728

2829
func TestParanoid_Count(t *testing.T) {
30+
fmt.Println("COUNT")
2931
examples := []struct {
3032
Name string
3133
Query bson.M

mongo/pagination/pagination_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package pagination
22

33
import (
44
"context"
5+
"fmt"
56
"strconv"
67
"testing"
78

@@ -46,6 +47,7 @@ func newDummyDocumentsIncludingDeleted(t *testing.T, virtualStorageName string,
4647
}
4748

4849
func TestPaginationPaginate(t *testing.T) {
50+
fmt.Println("PAGINATE")
4951
runs := []struct {
5052
Name string
5153
DummyDocument func(t *testing.T) func()

0 commit comments

Comments
 (0)