Skip to content

Commit

Permalink
Merge pull request #11 from mit-pdos/ci-go-matrix
Browse files Browse the repository at this point in the history
build: add go matrix, refactor ci
  • Loading branch information
sanjit-bhat authored Jul 22, 2024
2 parents d6efea6 + 904300a commit 7639b31
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
14 changes: 8 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
version: 2

updates:
- package-ecosystem: 'gomod'
directory: '/'
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: 'weekly'
interval: "weekly"
time: "04:00"
timezone: "US/Eastern"

- package-ecosystem: 'github-actions'
directory: '/'
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: 'weekly'
interval: "weekly"
23 changes: 14 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,26 @@ name: CI

on:
push:
branches: [ 'main' ]
branches: ["main"]
pull_request:
branches: [ 'main' ]
branches: ["main"]
schedule:
# 08:00 on Saturday.
- cron: '0 8 * * 6'
# 08:00 UTC on Saturday.
- cron: "0 8 * * 6"

jobs:
go:
strategy:
matrix:
go: ["1.22"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: ${{ matrix.go }}

- name: Test
run: go test -v ./...
Expand All @@ -34,8 +37,10 @@ jobs:
- name: Lint
uses: dominikh/staticcheck-action@v1
with:
version: 'v0.4.7'
version: "v0.4.7"
min-go-version: ${{ matrix.go }}
install-go: false
cache-key: ${{ matrix.go }}

python:
runs-on: ubuntu-latest
Expand All @@ -45,7 +50,7 @@ jobs:
- name: Format
uses: chartboost/ruff-action@v1
with:
args: 'format --check'
args: "format --check"

- name: Lint
uses: chartboost/ruff-action@v1
Expand All @@ -58,12 +63,12 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
python-version: "3.12"

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
go-version: "1.22"

- name: Run extra CI checks
run: python etc/ci-check.py
4 changes: 2 additions & 2 deletions .github/workflows/dependabot-automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Dependabot auto-merge
on: pull_request

permissions:
pull-requests: write
contents: write
pull-requests: write

jobs:
dependabot-automerge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
if: ${{ github.actor == "dependabot[bot]" }}
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ github.token }}
Expand Down

0 comments on commit 7639b31

Please sign in to comment.