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

GHA Migration #103

Merged
merged 6 commits into from
Sep 28, 2022
Merged
Changes from 3 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
16 changes: 10 additions & 6 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [1.19]
go-version: [ 1.15.3, 1.19 ]

steps:
- name: Setup go
Expand All @@ -24,7 +24,7 @@ jobs:

- name: Create test directory
run: |
mkdir -p ${{env.TEST_RESULTS}}
mkdir -p ${{ env.TEST_RESULTS }}

- name: Download go modules
run: go mod download
Expand All @@ -33,7 +33,6 @@ jobs:
uses: actions/cache@v3
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
Expand All @@ -49,9 +48,14 @@ jobs:
echo "$files"
exit 1
fi


# Install gotestsum with go get for 1.15.3; otherwise default to go install
- name: Install gotestsum
Copy link
Contributor Author

@claire-labry claire-labry Sep 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@samsalisbury could I get a re-review on the install gotestsum job? The job for 1.15.3 had failed when I pushed up the feedback. I had to wrap an if/else statement as 1.15.3 requires go get to install gotestsum but newer Go versions use the go install convention. The checks show that everything is being downloaded properly & passing but wanted to make sure the logic here makes sense?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic looks good to me. I made a suggestion, but really do make your own mind up on whether you like it! I think your version might be more popular :) Thanks.

run: go install gotest.tools/[email protected]
run: |
if [ ${{ matrix.go-version }} == 1.15.3 ]; then
go get gotest.tools/[email protected]; else
go install gotest.tools/[email protected]
fi
claire-labry marked this conversation as resolved.
Show resolved Hide resolved

- name: Run go tests
run: |
Expand All @@ -63,4 +67,4 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: Test Results
path: ${{env.TEST_RESULTS}}
path: ${{ env.TEST_RESULTS }}