Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: bump actions version #198

Merged
merged 2 commits into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 17 additions & 38 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: CI

on: [
push,
pull_request
]
on: [ push, pull_request ]

env:
GO_VERSION: "1.21"
Expand All @@ -13,27 +10,20 @@ permissions:

jobs:
typos-check:
name: spell-typos-check
name: Check typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3

- name: Check spelling with custom config file
uses: crate-ci/typos@v1.14.8
- uses: actions/checkout@v4
- uses: crate-ci/typos@master

lint:
name: lint
name: Check linters
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
Expand All @@ -42,43 +32,32 @@ jobs:
args: -v

unit-test:
name: coverage
name: Unit test coverage
runs-on: ubuntu-latest
needs: [ lint ]
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Unit test
run: |
make coverage

run: make coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: ./coverage.xml
name: codecov-gtctl
verbose: true
e2e:
name: e2e
name: End to End tests
runs-on: ubuntu-latest
needs: [ lint ]
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Run e2e
run: |
make e2e
- name: Run End to End tests
run: make e2e
4 changes: 2 additions & 2 deletions .github/workflows/license-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
runs-on: ubuntu-latest
name: license-header-check
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Check License Header
uses: korandoru/hawkeye@v3
uses: korandoru/hawkeye@v5
29 changes: 10 additions & 19 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,12 @@ jobs:
goarch: amd64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Build project
run: |
make
run: make
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
Expand All @@ -67,19 +62,17 @@ jobs:
echo $(shasum -a 256 ${{ matrix.file }}.tgz | cut -f1 -d' ') > ${{ matrix.file }}.sha256sum

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.file }}
path: bin/${{ matrix.file }}.tgz

- name: Upload checksum of artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.file }}.sha256sum
path: bin/${{ matrix.file }}.sha256sum

- name: Upload artifacts to S3
uses: nick-invision/retry@v2
uses: nick-invision/retry@v3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_CN_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_CN_SECRET_ACCESS_KEY}}
Expand Down Expand Up @@ -107,10 +100,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4

- name: Publish release
uses: ncipollo/release-action@v1
Expand All @@ -129,11 +122,9 @@ jobs:
if: ${{ inputs.release-install-script }}
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3

- uses: actions/checkout@v4
- name: Upload install.sh to S3
uses: nick-invision/retry@v2
uses: nick-invision/retry@v4
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_CN_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_CN_SECRET_ACCESS_KEY}}
Expand Down
Loading