Skip to content

Commit

Permalink
mess around with gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
leon-richardt committed Oct 6, 2022
1 parent 595712d commit 98db221
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ jobs:
strategy:
matrix:
go: [1.18, 1.19]
os: [ubuntu-latest, windows-latest, macos-latest]
# TODO(leon): GitHub will supposedly switch ubuntu-latest to 22.04 later this year:
# https://github.com/actions/runner-images/issues/5998#issuecomment-1231939134
os: [ubuntu-22.04, windows-latest, macos-latest]

steps:
- uses: actions/setup-go@v3
Expand All @@ -26,8 +28,8 @@ jobs:
- uses: actions/checkout@v3

- name: Get external dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt update && sudo apt -y install libvips-dev
if: matrix.os == 'ubuntu-22.04'
run: sudo apt update && sudo apt -y install build-essential libvips-dev

- name: Get external dependencies (MacOS)
if: matrix.os == 'macos-latest'
Expand All @@ -48,11 +50,11 @@ jobs:
run: go test -v -tags migrationtest ./...

- name: Generate code coverage
if: matrix.os == 'ubuntu-latest' && matrix.go == '1.19'
if: matrix.os == 'ubuntu-22.04' && matrix.go == '1.19'
run: go test -race -v -count=1 -coverprofile=coverage.out -tags test ./...

- name: Upload Test Coverage
if: matrix.os == 'ubuntu-latest' && matrix.go == '1.19'
if: matrix.os == 'ubuntu-22.04' && matrix.go == '1.19'
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
Expand All @@ -65,7 +67,7 @@ jobs:

create-release:
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: startsWith(github.ref, 'refs/tags/')

steps:
Expand All @@ -75,7 +77,7 @@ jobs:

- uses: actions/download-artifact@v3
with:
name: chatterino-api-1.19-ubuntu-latest
name: chatterino-api-1.19-ubuntu-22.04
path: bins/ubuntu/

- uses: actions/download-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
Expand All @@ -38,7 +38,7 @@ jobs:
push:
needs: test

runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: github.event_name == 'push'

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

strategy:
matrix:
Expand Down

0 comments on commit 98db221

Please sign in to comment.