From 8945a5327368f486d3a11a20111f02b69af7fd9d Mon Sep 17 00:00:00 2001 From: Sarah Roberts Date: Fri, 16 Jun 2023 15:16:41 -0700 Subject: [PATCH 1/2] CORE-1909: fixed some broken unit tests --- main_test.go | 131 ++++++++++++++++++++++++++++----------------------- 1 file changed, 72 insertions(+), 59 deletions(-) diff --git a/main_test.go b/main_test.go index 6ffa824..2470708 100644 --- a/main_test.go +++ b/main_test.go @@ -1,8 +1,9 @@ -//nolint +// nolint package main import ( "bytes" + "context" "encoding/json" "fmt" "io/ioutil" @@ -28,12 +29,12 @@ func NewMockDB() *MockDB { } } -func (m *MockDB) isUser(username string) (bool, error) { +func (m *MockDB) isUser(ctx context.Context, username string) (bool, error) { _, ok := m.users[username] return ok, nil } -func (m *MockDB) hasPreferences(username string) (bool, error) { +func (m *MockDB) hasPreferences(ctx context.Context, username string) (bool, error) { stored, ok := m.storage[username] if !ok { return false, nil @@ -51,9 +52,9 @@ func (m *MockDB) hasPreferences(username string) (bool, error) { return true, nil } -func (m *MockDB) getPreferences(username string) ([]UserPreferencesRecord, error) { +func (m *MockDB) getPreferences(ctx context.Context, username string) ([]UserPreferencesRecord, error) { return []UserPreferencesRecord{ - UserPreferencesRecord{ + { ID: "id", Preferences: m.storage[username]["user-prefs"].(string), UserID: "user-id", @@ -61,7 +62,7 @@ func (m *MockDB) getPreferences(username string) ([]UserPreferencesRecord, error }, nil } -func (m *MockDB) insertPreferences(username, prefs string) error { +func (m *MockDB) insertPreferences(ctx context.Context, username, prefs string) error { if _, ok := m.storage[username]["user-prefs"]; !ok { m.storage[username] = make(map[string]interface{}) } @@ -69,11 +70,11 @@ func (m *MockDB) insertPreferences(username, prefs string) error { return nil } -func (m *MockDB) updatePreferences(username, prefs string) error { - return m.insertPreferences(username, prefs) +func (m *MockDB) updatePreferences(ctx context.Context, username, prefs string) error { + return m.insertPreferences(ctx, username, prefs) } -func (m *MockDB) deletePreferences(username string) error { +func (m *MockDB) deletePreferences(ctx context.Context, username string) error { delete(m.storage, username) return nil } @@ -202,15 +203,16 @@ func TestGetUserPreferencesForRequest(t *testing.T) { mock := NewMockDB() router := mux.NewRouter() n := NewPrefsApp(mock, router) + ctx := context.Background() expected := []byte("{\"one\":\"two\"}") expectedWrapped := []byte("{\"preferences\":{\"one\":\"two\"}}") mock.users["test-user"] = true - if err := mock.insertPreferences("test-user", string(expected)); err != nil { + if err := mock.insertPreferences(ctx, "test-user", string(expected)); err != nil { t.Error(err) } - actualWrapped, err := n.getUserPreferencesForRequest("test-user", true) + actualWrapped, err := n.getUserPreferencesForRequest(ctx, "test-user", true) if err != nil { t.Error(err) } @@ -219,7 +221,7 @@ func TestGetUserPreferencesForRequest(t *testing.T) { t.Errorf("The return value was '%s' instead of '%s'", actualWrapped, expectedWrapped) } - actual, err := n.getUserPreferencesForRequest("test-user", false) + actual, err := n.getUserPreferencesForRequest(ctx, "test-user", false) if err != nil { t.Error(err) } @@ -233,10 +235,11 @@ func TestPreferencesGetRequest(t *testing.T) { mock := NewMockDB() router := mux.NewRouter() n := NewPrefsApp(mock, router) + ctx := context.Background() expected := []byte("{\"one\":\"two\"}") mock.users["test-user"] = true - if err := mock.insertPreferences("test-user", string(expected)); err != nil { + if err := mock.insertPreferences(ctx, "test-user", string(expected)); err != nil { t.Error(err) } @@ -321,12 +324,13 @@ func TestPreferencesPostRequest(t *testing.T) { mock := NewMockDB() router := mux.NewRouter() n := NewPrefsApp(mock, router) + ctx := context.Background() username := "test-user" expected := []byte(`{"one":"two"}`) mock.users[username] = true - if err := mock.insertPreferences(username, string(expected)); err != nil { + if err := mock.insertPreferences(ctx, username, string(expected)); err != nil { t.Error(err) } @@ -378,8 +382,9 @@ func TestPreferencesDelete(t *testing.T) { mock.users[username] = true router := mux.NewRouter() n := NewPrefsApp(mock, router) + ctx := context.Background() - if err := mock.insertPreferences(username, string(expected)); err != nil { + if err := mock.insertPreferences(ctx, username, string(expected)); err != nil { t.Error(err) } @@ -425,7 +430,7 @@ func TestNewPrefsDB(t *testing.T) { prefs := NewPrefsDB(db) if prefs == nil { - t.Error("NewPrefsDB() returned nil") + t.Fatal("NewPrefsDB() returned nil") } if prefs.db != db { @@ -449,7 +454,7 @@ func TestPreferencesIsUser(t *testing.T) { WithArgs("test-user"). WillReturnRows(sqlmock.NewRows([]string{"check_user"}).AddRow(1)) - present, err := p.isUser("test-user") + present, err := p.isUser(context.Background(), "test-user") if err != nil { t.Errorf("error calling isUser(): %s", err) } @@ -479,7 +484,7 @@ func TestHasPreferences(t *testing.T) { WithArgs("test-user"). WillReturnRows(sqlmock.NewRows([]string{""}).AddRow("1")) - hasPrefs, err := p.hasPreferences("test-user") + hasPrefs, err := p.hasPreferences(context.Background(), "test-user") if err != nil { t.Errorf("error from hasPreferences(): %s", err) } @@ -509,7 +514,7 @@ func TestGetPreferences(t *testing.T) { WithArgs("test-user"). WillReturnRows(sqlmock.NewRows([]string{"id", "user_id", "preferences"}).AddRow("1", "2", "{}")) - records, err := p.getPreferences("test-user") + records, err := p.getPreferences(context.Background(), "test-user") if err != nil { t.Errorf("error from getPreferences(): %s", err) } @@ -556,7 +561,7 @@ func TestInsertPreferences(t *testing.T) { WithArgs("1", "{}"). WillReturnResult(sqlmock.NewResult(1, 1)) - if err = p.insertPreferences("test-user", "{}"); err != nil { + if err = p.insertPreferences(context.Background(), "test-user", "{}"); err != nil { t.Errorf("error inserting preferences: %s", err) } @@ -585,7 +590,7 @@ func TestUpdatePreferences(t *testing.T) { WithArgs("1", "{}"). WillReturnResult(sqlmock.NewResult(1, 1)) - if err = p.updatePreferences("test-user", "{}"); err != nil { + if err = p.updatePreferences(context.Background(), "test-user", "{}"); err != nil { t.Errorf("error updating preferences: %s", err) } @@ -614,7 +619,7 @@ func TestDeletePreferences(t *testing.T) { WithArgs("1"). WillReturnResult(sqlmock.NewResult(1, 1)) - if err = p.deletePreferences("test-user"); err != nil { + if err = p.deletePreferences(context.Background(), "test-user"); err != nil { t.Errorf("error deleting preferences: %s", err) } @@ -626,7 +631,7 @@ func TestDeletePreferences(t *testing.T) { // -------- End Preferences -------- // -------- Start Sessions -------- -func (m *MockDB) hasSessions(username string) (bool, error) { +func (m *MockDB) hasSessions(ctx context.Context, username string) (bool, error) { stored, ok := m.storage[username] if !ok { return false, nil @@ -644,9 +649,9 @@ func (m *MockDB) hasSessions(username string) (bool, error) { return true, nil } -func (m *MockDB) getSessions(username string) ([]UserSessionRecord, error) { +func (m *MockDB) getSessions(ctx context.Context, username string) ([]UserSessionRecord, error) { return []UserSessionRecord{ - UserSessionRecord{ + { ID: "id", Session: m.storage[username]["user-sessions"].(string), UserID: "user-id", @@ -654,7 +659,7 @@ func (m *MockDB) getSessions(username string) ([]UserSessionRecord, error) { }, nil } -func (m *MockDB) insertSession(username, session string) error { +func (m *MockDB) insertSession(ctx context.Context, username, session string) error { if _, ok := m.storage[username]["user-sessions"]; !ok { m.storage[username] = make(map[string]interface{}) } @@ -662,11 +667,11 @@ func (m *MockDB) insertSession(username, session string) error { return nil } -func (m *MockDB) updateSession(username, prefs string) error { - return m.insertSession(username, prefs) +func (m *MockDB) updateSession(ctx context.Context, username, prefs string) error { + return m.insertSession(ctx, username, prefs) } -func (m *MockDB) deleteSession(username string) error { +func (m *MockDB) deleteSession(ctx context.Context, username string) error { delete(m.storage, username) return nil } @@ -775,15 +780,16 @@ func TestGetUserSessionForRequest(t *testing.T) { mock := NewMockDB() router := mux.NewRouter() n := NewSessionsApp(mock, router) + ctx := context.Background() expected := []byte("{\"one\":\"two\"}") expectedWrapped := []byte("{\"session\":{\"one\":\"two\"}}") mock.users["test-user"] = true - if err := mock.insertSession("test-user", string(expected)); err != nil { + if err := mock.insertSession(ctx, "test-user", string(expected)); err != nil { t.Error(err) } - actualWrapped, err := n.getUserSessionForRequest("test-user", true) + actualWrapped, err := n.getUserSessionForRequest(ctx, "test-user", true) if err != nil { t.Error(err) } @@ -792,7 +798,7 @@ func TestGetUserSessionForRequest(t *testing.T) { t.Errorf("The return value was '%s' instead of '%s'", actualWrapped, expectedWrapped) } - actual, err := n.getUserSessionForRequest("test-user", false) + actual, err := n.getUserSessionForRequest(ctx, "test-user", false) if err != nil { t.Error(err) } @@ -806,10 +812,11 @@ func TestSessionsGetRequest(t *testing.T) { mock := NewMockDB() router := mux.NewRouter() n := NewSessionsApp(mock, router) + ctx := context.Background() expected := []byte("{\"one\":\"two\"}") mock.users["test-user"] = true - if err := mock.insertSession("test-user", string(expected)); err != nil { + if err := mock.insertSession(ctx, "test-user", string(expected)); err != nil { t.Error(err) } @@ -894,12 +901,13 @@ func TestSessionsPostRequest(t *testing.T) { mock := NewMockDB() router := mux.NewRouter() n := NewSessionsApp(mock, router) + ctx := context.Background() username := "test-user" expected := []byte(`{"one":"two"}`) mock.users[username] = true - if err := mock.insertSession(username, string(expected)); err != nil { + if err := mock.insertSession(ctx, username, string(expected)); err != nil { t.Error(err) } @@ -951,8 +959,9 @@ func TestSessionsDelete(t *testing.T) { mock.users[username] = true router := mux.NewRouter() n := NewSessionsApp(mock, router) + ctx := context.Background() - if err := mock.insertSession(username, string(expected)); err != nil { + if err := mock.insertSession(ctx, username, string(expected)); err != nil { t.Error(err) } @@ -998,7 +1007,7 @@ func TestNewSessionsDB(t *testing.T) { p := NewSessionsDB(db) if p == nil { - t.Error("NewSessionsDB returned nil") + t.Fatal("NewSessionsDB returned nil") } if db != p.db { @@ -1022,7 +1031,7 @@ func TestSessionsIsUser(t *testing.T) { WithArgs("test-user"). WillReturnRows(sqlmock.NewRows([]string{"check_user"}).AddRow(1)) - present, err := p.isUser("test-user") + present, err := p.isUser(context.Background(), "test-user") if err != nil { t.Errorf("error calling isUser(): %s", err) } @@ -1052,7 +1061,7 @@ func TestHasSessions(t *testing.T) { WithArgs("test-user"). WillReturnRows(sqlmock.NewRows([]string{""}).AddRow("1")) - hasSessions, err := p.hasSessions("test-user") + hasSessions, err := p.hasSessions(context.Background(), "test-user") if err != nil { t.Errorf("error from hasSessions(): %s", err) } @@ -1082,7 +1091,7 @@ func TestGetSessions(t *testing.T) { WithArgs("test-user"). WillReturnRows(sqlmock.NewRows([]string{"id", "user_id", "session"}).AddRow("1", "2", "{}")) - records, err := p.getSessions("test-user") + records, err := p.getSessions(context.Background(), "test-user") if err != nil { t.Errorf("error from getSessions(): %s", err) } @@ -1129,7 +1138,7 @@ func TestInsertSession(t *testing.T) { WithArgs("1", "{}"). WillReturnResult(sqlmock.NewResult(1, 1)) - if err = p.insertSession("test-user", "{}"); err != nil { + if err = p.insertSession(context.Background(), "test-user", "{}"); err != nil { t.Errorf("error inserting session: %s", err) } @@ -1158,7 +1167,7 @@ func TestUpdateSession(t *testing.T) { WithArgs("1", "{}"). WillReturnResult(sqlmock.NewResult(1, 1)) - if err = p.updateSession("test-user", "{}"); err != nil { + if err = p.updateSession(context.Background(), "test-user", "{}"); err != nil { t.Errorf("error updating session: %s", err) } @@ -1187,7 +1196,7 @@ func TestDeleteSession(t *testing.T) { WithArgs("1"). WillReturnResult(sqlmock.NewResult(1, 1)) - if err = p.deleteSession("test-user"); err != nil { + if err = p.deleteSession(context.Background(), "test-user"); err != nil { t.Errorf("error deleting session: %s", err) } @@ -1199,7 +1208,7 @@ func TestDeleteSession(t *testing.T) { // -------- End Sessions -------- // -------- Start Searches -------- -func (m *MockDB) hasSavedSearches(username string) (bool, error) { +func (m *MockDB) hasSavedSearches(ctx context.Context, username string) (bool, error) { stored, ok := m.storage[username] if !ok { return false, nil @@ -1215,16 +1224,16 @@ func (m *MockDB) hasSavedSearches(username string) (bool, error) { } -func (m *MockDB) getSavedSearches(username string) ([]string, error) { +func (m *MockDB) getSavedSearches(ctx context.Context, username string) ([]string, error) { return []string{m.storage[username]["saved_searches"].(string)}, nil } -func (m *MockDB) deleteSavedSearches(username string) error { +func (m *MockDB) deleteSavedSearches(ctx context.Context, username string) error { delete(m.storage, username) return nil } -func (m *MockDB) insertSavedSearches(username, savedSearches string) error { +func (m *MockDB) insertSavedSearches(ctx context.Context, username, savedSearches string) error { if _, ok := m.storage[username]["saved_searches"]; !ok { m.storage[username] = make(map[string]interface{}) } @@ -1232,8 +1241,8 @@ func (m *MockDB) insertSavedSearches(username, savedSearches string) error { return nil } -func (m *MockDB) updateSavedSearches(username, savedSearches string) error { - return m.insertSavedSearches(username, savedSearches) +func (m *MockDB) updateSavedSearches(ctx context.Context, username, savedSearches string) error { + return m.insertSavedSearches(ctx, username, savedSearches) } func TestSearchesGreeting(t *testing.T) { @@ -1273,10 +1282,11 @@ func TestSearchesGreeting(t *testing.T) { func TestGetSavedSearchesForRequest(t *testing.T) { username := "test_user@test-domain.org" expectedBody := `{"search":"fake"}` + ctx := context.Background() mock := NewMockDB() mock.users[username] = true - if err := mock.insertSavedSearches(username, expectedBody); err != nil { + if err := mock.insertSavedSearches(ctx, username, expectedBody); err != nil { t.Error(err) } @@ -1364,10 +1374,11 @@ func TestPutInsertSavedSearchesForRequest(t *testing.T) { func TestPutUpdateSavedSearchesForRequest(t *testing.T) { username := "test_user@test-domain.org" expectedBody := `{"search":"fake"}` + ctx := context.Background() mock := NewMockDB() mock.users[username] = true - if err := mock.insertSavedSearches(username, expectedBody); err != nil { + if err := mock.insertSavedSearches(ctx, username, expectedBody); err != nil { t.Error(err) } @@ -1462,10 +1473,11 @@ func TestPostInsertSavedSearchesForRequest(t *testing.T) { func TestPostUpdateSavedSearchesForRequest(t *testing.T) { username := "test_user@test-domain.org" expectedBody := `{"search":"fake"}` + ctx := context.Background() mock := NewMockDB() mock.users[username] = true - if err := mock.insertSavedSearches(username, expectedBody); err != nil { + if err := mock.insertSavedSearches(ctx, username, expectedBody); err != nil { t.Error(err) } @@ -1510,10 +1522,11 @@ func TestPostUpdateSavedSearchesForRequest(t *testing.T) { func TestDeleteSavedSearchesForRequest(t *testing.T) { username := "test_user@test-domain.org" expectedBody := `{"search":"fake"}` + ctx := context.Background() mock := NewMockDB() mock.users[username] = true - if err := mock.insertSavedSearches(username, expectedBody); err != nil { + if err := mock.insertSavedSearches(ctx, username, expectedBody); err != nil { t.Error(err) } @@ -1560,7 +1573,7 @@ func TestNewSearchesDB(t *testing.T) { prefs := NewSearchesDB(db) if prefs == nil { - t.Error("NewSearchesDB() returned nil") + t.Fatal("NewSearchesDB() returned nil") } if prefs.db != db { @@ -1584,7 +1597,7 @@ func TestSavedSearchesIsUser(t *testing.T) { WithArgs("test-user"). WillReturnRows(sqlmock.NewRows([]string{"check_user"}).AddRow(1)) - present, err := p.isUser("test-user") + present, err := p.isUser(context.Background(), "test-user") if err != nil { t.Errorf("error calling isUser(): %s", err) } @@ -1610,7 +1623,7 @@ func TestHasSavedSearches(t *testing.T) { WithArgs("test-user"). WillReturnRows(sqlmock.NewRows([]string{"exists"}).AddRow(true)) - exists, err := p.hasSavedSearches("test-user") + exists, err := p.hasSavedSearches(context.Background(), "test-user") if err != nil { t.Errorf("error from hasSavedSearches(): %s", err) } @@ -1640,7 +1653,7 @@ func TestGetSavedSearches(t *testing.T) { WithArgs("test-user"). WillReturnRows(sqlmock.NewRows([]string{"saved_searches"}).AddRow("{}")) - retval, err := p.getSavedSearches("test-user") + retval, err := p.getSavedSearches(context.Background(), "test-user") if err != nil { t.Errorf("error from getSavedSearches(): %s", err) } @@ -1678,7 +1691,7 @@ func TestInsertSavedSearches(t *testing.T) { WithArgs("1", "{}"). WillReturnResult(sqlmock.NewResult(1, 1)) - if err := p.insertSavedSearches("test-user", "{}"); err != nil { + if err := p.insertSavedSearches(context.Background(), "test-user", "{}"); err != nil { t.Errorf("error inserting saved searches: %s", err) } @@ -1707,7 +1720,7 @@ func TestUpdateSavedSearches(t *testing.T) { WithArgs("1", "{}"). WillReturnResult(sqlmock.NewResult(1, 1)) - if err := p.updateSavedSearches("test-user", "{}"); err != nil { + if err := p.updateSavedSearches(context.Background(), "test-user", "{}"); err != nil { t.Errorf("error updating saved searches: %s", err) } @@ -1736,7 +1749,7 @@ func TestDeleteSavedSearches(t *testing.T) { WithArgs("1"). WillReturnResult(sqlmock.NewResult(1, 1)) - if err := p.deleteSavedSearches("test-user"); err != nil { + if err := p.deleteSavedSearches(context.Background(), "test-user"); err != nil { t.Errorf("error deleting saved searches: %s", err) } From 4c3d2cc18fb6a3f17380f408cd2c9099319fc6fc Mon Sep 17 00:00:00 2001 From: Sarah Roberts Date: Fri, 16 Jun 2023 15:17:04 -0700 Subject: [PATCH 2/2] CORE-1909: added GitHub actions for creating releases --- .github/workflows/build-prerelease.yml | 35 ++++++++++++++++++++++++++ .github/workflows/build-release.yml | 34 +++++++++++++++++++++++++ .github/workflows/golangci-lint.yml | 35 +++++++++++++++++++------- 3 files changed, 95 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/build-prerelease.yml create mode 100644 .github/workflows/build-release.yml diff --git a/.github/workflows/build-prerelease.yml b/.github/workflows/build-prerelease.yml new file mode 100644 index 0000000..8ba760d --- /dev/null +++ b/.github/workflows/build-prerelease.yml @@ -0,0 +1,35 @@ +name: skaffold-build-prerelease +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" +jobs: + pipeline: + name: Skaffold Docker build + runs-on: ubuntu-20.04 + steps: + - name: Checkout Repo + id: checkout + uses: actions/checkout@v3 + - name: Harbor Login + id: harbor_login + uses: docker/login-action@v2 + with: + registry: harbor.cyverse.org + username: ${{ secrets.HARBOR_USERNAME }} + password: ${{ secrets.HARBOR_PASSWORD }} + - name: Install Kubernetes Tools + id: install_k8s_tools + uses: yokawasa/action-setup-kube-tools@v0.9.2 + - name: Build Docker images + id: build + run: | + skaffold build --file-output build.json + - name: Build manifest tarball + id: build_manifest_tarball + run: | + tar -czpvf deploy-info.tar.gz build.json skaffold.yaml k8s + - uses: ncipollo/release-action@v1 + with: + artifacts: "build.json,deploy-info.tar.gz" + prerelease: true diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..be07f90 --- /dev/null +++ b/.github/workflows/build-release.yml @@ -0,0 +1,34 @@ +name: skaffold-build-release +on: + push: + tags: + - "v[0-9]+.[0-9]+.[0-9]+" +jobs: + pipeline: + name: Skaffold Docker build + runs-on: ubuntu-20.04 + steps: + - name: Checkout Repo + id: checkout + uses: actions/checkout@v3 + - name: Harbor Login + id: harbor_login + uses: docker/login-action@v2 + with: + registry: harbor.cyverse.org + username: ${{ secrets.HARBOR_USERNAME }} + password: ${{ secrets.HARBOR_PASSWORD }} + - name: Install Kubernetes Tools + id: install_k8s_tools + uses: yokawasa/action-setup-kube-tools@v0.9.2 + - name: Build Docker images + id: build + run: | + skaffold build --file-output build.json + - name: Build manifest tarball + id: build_manifest_tarball + run: | + tar -czpvf deploy-info.tar.gz build.json skaffold.yaml k8s + - uses: ncipollo/release-action@v1 + with: + artifacts: "build.json,deploy-info.tar.gz" diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index d1d10c0..d2af3ec 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -1,38 +1,55 @@ name: golangci-lint on: push: - tags: - - v* branches: - master - main pull_request: + +permissions: + contents: read + # Optional: allow read access to pull request. Use with `only-new-issues` option. + # pull-requests: read + jobs: golangci: name: lint runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '1.19' + cache: false - name: golangci-lint - uses: golangci/golangci-lint-action@v2 + uses: golangci/golangci-lint-action@v3 with: - # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version - version: latest + # Require: The version of golangci-lint to use. + # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. + # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. + version: v1.53 # Optional: working directory, useful for monorepos # working-directory: somedir # Optional: golangci-lint command line arguments. - # args: --issues-exit-code=0 + # + # Note: by default the `.golangci.yml` file should be at the root of the repository. + # The location of the configuration file can be changed by using `--config=` + # args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0 # Optional: show only new issues if it's a pull request. The default value is `false`. # only-new-issues: true - # Optional: if set to true then the action will use pre-installed Go. - # skip-go-installation: true + # Optional: if set to true then the all caching functionality will be complete disabled, + # takes precedence over all other caching options. + # skip-cache: true # Optional: if set to true then the action don't cache or restore ~/go/pkg. # skip-pkg-cache: true # Optional: if set to true then the action don't cache or restore ~/.cache/go-build. # skip-build-cache: true + + # Optional:The mode to install golangci-lint. It can be 'binary' or 'goinstall'. + # install-mode: "goinstall"