Skip to content

Commit

Permalink
build(go): bump golang version to 1.18 (#5348)
Browse files Browse the repository at this point in the history
Signed-off-by: João Reigota <[email protected]>
Co-authored-by: rafaela-soares <[email protected]>
  • Loading branch information
joaoReigota1 and rafaela-soares authored May 16, 2022
1 parent 213e2d9 commit 75251d6
Show file tree
Hide file tree
Showing 22 changed files with 456 additions and 819 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go-ci-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go 1.17.x
- name: Set up Go 1.18.x
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x
- name: Run test metrics script
id: testcov
run: |
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go 1.17.x
- name: Set up Go 1.18.x
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x
- name: golangci-lint
uses: golangci/[email protected]
with:
version: v1.37
version: v1.46.1
args: -c .golangci.yml --timeout 15m
skip-go-installation: true
go-generate:
name: go-generate
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.17.x
- name: Set up Go 1.18.x
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x
- name: Check out code
uses: actions/checkout@v3
with:
Expand All @@ -39,11 +38,11 @@ jobs:
name: unit-tests
strategy:
matrix:
go-version: [1.17.x]
go-version: [1.18.x]
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go 1.17.x
- name: Set up Go 1.18.x
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/go-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.17.x]
go-version: [1.18.x]
os: [ubuntu-latest]
kics-docker: ["Dockerfile", "Dockerfile.ubi8"]
runs-on: ${{ matrix.os }}
Expand All @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v3
with:
persist-credentials: false
- name: Set up Go 1.17.x
- name: Set up Go 1.18.x
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
Expand Down Expand Up @@ -98,4 +98,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: e2e-tests-report-${{ matrix.kics-docker }}
path: e2e-report.html
path: e2e-report.html
4 changes: 2 additions & 2 deletions .github/workflows/go-test-race.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go 1.17.x
- name: Set up Go 1.18.x
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-apispec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18.x
- name: Run GoReleaser
uses: goreleaser/[email protected]
with:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/release-commits.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ on:
push:
tags:
- "v*"

jobs:
release-commits:
name: get-release-commits
runs-on: ubuntu-latest
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Set up Go 1.17.x
- name: Set up Go 1.18.x
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x
- uses: actions/setup-python@v3
with:
python-version: "3.x"
Expand All @@ -24,4 +24,3 @@ jobs:
run: |
pip3 install -r .github/scripts/release-commits/requirements.txt
python3 .github/scripts/release-commits/get_commits.py
2 changes: 1 addition & 1 deletion .github/workflows/release-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.17
go-version: 1.18.x
- name: Run GoReleaser
uses: goreleaser/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# - name: Set up Go
# uses: actions/setup-go@v2
# with:
# go-version: 1.17
# go-version: 1.18.x
# - name: Run GoReleaser
# uses: goreleaser/[email protected]
# with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/statistics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
steps:
- name: Checkout Source
uses: actions/checkout@v3
- name: Set up Go 1.17.x
- name: Set up Go 1.18.x
uses: actions/setup-go@v3
with:
go-version: 1.17.x
go-version: 1.18.x
- name: Run test metrics script
id: testcoverage
run: |
Expand All @@ -36,4 +36,3 @@ jobs:
run: |
pip3 install -r .github/scripts/statistics/requirements.txt
python3 .github/scripts/statistics/get_statistics.py -c ${{steps.testcoverage.outputs.coverage}} -t ${{steps.testcoverage.outputs.total_tests}} -g ${{steps.go_loc.outputs.goloc}}
6 changes: 3 additions & 3 deletions Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ WORKDIR /build

ENV PATH=$PATH:/usr/local/go/bin

ADD https://golang.org/dl/go1.17.1.linux-amd64.tar.gz .
ADD https://golang.org/dl/go1.18.2.linux-amd64.tar.gz .
RUN yum install git gcc -y \
&& rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.1.linux-amd64.tar.gz \
&& rm -f go1.17.1.linux-amd64.tar.gz
&& rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.2.linux-amd64.tar.gz \
&& rm -f go1.18.2.linux-amd64.tar.gz

ENV GOPRIVATE=github.com/Checkmarx/*
ARG VERSION="development"
Expand Down
Loading

0 comments on commit 75251d6

Please sign in to comment.