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

chore: update GHA and Dependabot config #28

Merged
merged 2 commits into from
Aug 30, 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
36 changes: 26 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,33 @@
# Configuration file for GitHub Dependabot
# https://help.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
# Root directory for GitHub Actions is
# the default location of `.github/workflows`
directory: "/"
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: "monthly"
# Maintain dependencies for Go Modules
interval: 'weekly'
day: 'saturday'
time: '09:00'
timezone: 'Asia/Singapore'
groups:
gha:
patterns:
- '*'
update-types:
- 'minor'
- 'patch'
- package-ecosystem: "gomod"
directory: "/"
directory: '/'
schedule:
interval: "monthly"
interval: 'weekly'
day: 'saturday'
time: '09:00'
timezone: 'Asia/Singapore'
groups:
gha:
patterns:
- '*'
update-types:
- 'minor'
- 'patch'
42 changes: 21 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,44 @@ on:
branches:
- main

defaults:
run:
# NOTE: Default option does not include `-o pipefail` as documented
# unless explicitly specifying the `bash` shell.
# https://github.com/actions/runner/issues/353
shell: bash

jobs:
test-golang:
name: Test on Go ${{ matrix.go }} (${{ matrix.os }})
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 3
strategy:
matrix:
os:
# NOTE: Non-linux systems uses more billable minutes.
# Enable them only if they are strictly required.
# - windows-latest
# - macos-latest
- ubuntu-latest
# - "windows-2022"
# - "macos-14"
- "ubuntu-22.04"
go:
# - 1.12
# - 1.13
# - 1.14
# - 1.15
- 1.16
- 1.17
- "1.16"
- "1.17"
- "1.18"
- "1.19"
- "1.20"
- "1.21"
- "1.22"
- "1.23"

steps:
- name: Checkout branch
uses: actions/checkout@v2
uses: actions/checkout@v4.1.7

- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v2
uses: actions/setup-go@v5.0.2
with:
go-version: ${{ matrix.go }}

- name: Cache Go modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Lint code
run: |
make lint
Expand Down