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

Update GitHub Actions (bump versions, improve naming a bit) #1895

Merged
merged 6 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
25 changes: 0 additions & 25 deletions .github/workflows/golangci-lint.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/lint.yml
Juneezee marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run lints

on:
push:
tags:
- v3.*
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.20"

- name: Clone repository
uses: actions/checkout@v4

- name: Run golangci-lint
uses: golangci/golangci-lint-action@v5
with:
version: latest

- name: Set up staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest

- name: Run staticcheck
run: staticcheck ./...
34 changes: 26 additions & 8 deletions .github/workflows/cli.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Run Tests
name: Run tests

on:
push:
branches:
Expand All @@ -8,20 +9,26 @@ on:
pull_request:
branches:
- main

permissions:
contents: read

jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: [1.19.x, 1.20.x]

name: ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}

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

- name: Set PATH
run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"
- uses: actions/checkout@v3
Expand All @@ -47,38 +54,49 @@ jobs:
name: test-docs
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.20.x
- uses: actions/setup-node@v3

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: 16

- name: Set PATH
run: echo "${GITHUB_WORKSPACE}/.local/bin" >>"${GITHUB_PATH}"
- uses: actions/checkout@v3

- name: Clone repository
uses: actions/checkout@v4

- run: make ensure-gfmrun
- run: make gfmrun
env:
FLAGS: --walk docs/v3/
- run: make diffcheck

publish:
permissions:
contents: write
# TODO: switch once v3 is out of alpha {{
# if: startswith(github.ref, 'refs/tags/')
if: 'false'
if: false
# }}
name: publish
needs: [test-docs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- run: make ensure-mkdocs
env:
FLAGS: --upgrade-pip

- run: make set-mkdocs-remote
env:
MKDOCS_REMOTE_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: make deploy-mkdocs
1 change: 1 addition & 0 deletions staticcheck.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
checks=["all"]
Loading