Skip to content

Commit

Permalink
Merge pull request #53 from thaJeztah/gha_rm_workingdir
Browse files Browse the repository at this point in the history
gha: remove GOPATH and workingdir, update actions/setup-go@v4, actions/checkout@v4
  • Loading branch information
dmcgowan authored Sep 15, 2023
2 parents f69b90b + ee96969 commit ab78d10
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
32 changes: 9 additions & 23 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@ jobs:
timeout-minutes: 5

steps:
- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: 1.20.x

- name: Set env
shell: bash
# TODO(thaJeztah): remove working-directory, path, and GOPATH once project-checks stops needing them; see https://github.com/containerd/nri/pull/53/commits/872fb0ce3dce136f3ae67c068ce78607565194ef#r1324366346
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
path: src/github.com/containerd/nri
fetch-depth: 25
Expand All @@ -39,23 +40,18 @@ jobs:
timeout-minutes: 5

steps:
- uses: actions/checkout@v3
with:
path: src/github.com/containerd/nri

- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.20.x

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- run: |
make all
working-directory: src/github.com/containerd/nri
linters:
name: Linters
Expand All @@ -68,24 +64,19 @@ jobs:
os: [ubuntu-22.04]

steps:
- uses: actions/checkout@v3
with:
path: src/github.com/containerd/nri

- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- uses: golangci/golangci-lint-action@v3
with:
version: v1.51.2
working-directory: src/github.com/containerd/nri

tests:
name: Tests
Expand All @@ -97,20 +88,15 @@ jobs:
go: [1.19.x, 1.20.x]

steps:
- uses: actions/checkout@v3
with:
path: src/github.com/containerd/nri

- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}

- name: Set env
shell: bash
run: |
echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV
echo "${{ github.workspace }}/bin" >> $GITHUB_PATH
- run: |
make install-ginkgo test codecov
working-directory: src/github.com/containerd/nri
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-go@v3
- uses: actions/setup-go@v4
with:
go-version: 1.20.x

Expand Down

0 comments on commit ab78d10

Please sign in to comment.