Skip to content

Commit

Permalink
Update CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
maargenton committed Nov 11, 2024
1 parent 021d916 commit 087ecf6
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,6 @@ jobs:
- name: Test and build
run: rake build

# - name: Run tests with coverage
# if: matrix.os != 'windows-latest'
# run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...

# - name: Run tests without coverage (windows)
# if: matrix.os == 'windows-latest'
# run: go test -race ./...

- name: Upload coverage
if: matrix.os != 'windows-latest'
uses: codecov/codecov-action@v4
Expand Down
58 changes: 34 additions & 24 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,41 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-ruby@v1
with:
ruby-version: '2.5'
- uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Checkout repository
uses: actions/checkout@v4

- name: Run tests
if: matrix.os == 'windows-latest'
run: go test -race ./...
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.23.x

- name: Build and publish
run: rake build
- name: Check version
run: go version

# - name: Archive action artifacts
# uses: actions/upload-artifact@v2
# with:
# name: artifacts
# path: build/artifacts/*
- name: Test and build
run: rake build

- name: Upload artifacts to release
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: ncipollo/release-action@v1
with:
artifacts: "build/artifacts/*"
bodyFile: "build/release_notes"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
flags: unittests
file: build/go-test-coverage.txt

- name: Archive build artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-${{env.VERSION}}
path: |
build/release_notes.md
build/artifacts/*
- name: Upload artifacts to release
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: ncipollo/release-action@v1
with:
artifacts: "build/artifacts/*"
bodyFile: "build/release_notes"
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 087ecf6

Please sign in to comment.