Skip to content

Bump actions/checkout from 4 to 5 #331

Bump actions/checkout from 4 to 5

Bump actions/checkout from 4 to 5 #331

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Build
run: go build -v ./...
- name: Test
run: go test -v -shuffle on ./...
evaluate:
name: Evaluate
runs-on: ubuntu-latest
if: ${{ github.triggering_actor != 'dependabot[bot]' }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Evaluate
run: |
go test -run TestEval ./...
jq -s '{"Branch": "${{ github.ref_name }}", "Evals": .}' evals.jsonl > evals.json
curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer ${{ secrets.EVALS_FUN_SECRET_KEY }}" -d @evals.json https://api.evals.fun/evals
- name: Add evals comment to PR
uses: actions/github-script@v7
if: ${{ github.event_name == 'pull_request' }}
with:
script: |
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: `# Evals\n\n![Evals](https://api.evals.fun/evals.svg?key=${{ secrets.EVALS_FUN_PUBLIC_KEY }}&branch=${{ github.ref_name }}&cacheKey=${{ github.sha }})`
})
lint:
name: Lint
runs-on: ubuntu-latest
if: ${{ github.triggering_actor != 'dependabot[bot]' }}
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true
- name: Lint
uses: golangci/golangci-lint-action@v8
with:
version: latest