Skip to content
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
38 changes: 22 additions & 16 deletions .github/workflows/CI&CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: CI/CD

on:
push:
tags: v*
branches: master
tags: [v*]
branches: [master]
pull_request:
branches: master
branches: [master]

env:
GO_VERSION: '1.23.2' # Also in Dockerfile.
Expand All @@ -16,32 +16,33 @@ jobs:
runs-on: 'ubuntu-latest'
timeout-minutes: 30
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/checkout@v4
cache: false

- uses: actions/cache@v4
id: cache-go-with-tools
with:
path: |
~/go/bin
~/go/pkg
~/go/src
~/go/pkg/mod
~/.cache/go-build
~/.cache/golangci-lint
.buildcache
key: v4-test-${{ runner.os }}-${{ hashFiles('go.mod') }}
key: v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('tools.go') }}-${{ hashFiles('go.sum') }}
restore-keys: |
v4-test-${{ runner.os }}-
v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('tools.go') }}-
v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-

- run: scripts/test

- name: Report code coverage
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
if: env.COVERALLS_TOKEN
run: |
run: |-
scripts/cover
.buildcache/bin/goveralls -coverprofile=.buildcache/cover.out -service=GitHub

Expand All @@ -51,11 +52,12 @@ jobs:
timeout-minutes: 30
if: github.event_name == 'push'
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- uses: actions/checkout@v4
cache: false

- name: Turnstyle
uses: softprops/turnstyle@v2
Expand All @@ -65,13 +67,17 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/cache@v4
id: cache-go-with-tools
with:
path: |
~/go/pkg
~/go/pkg/mod
~/.cache/go-build
key: v1-build-${{ runner.os }}-${{ hashFiles('go.mod') }}
~/.cache/golangci-lint
.buildcache
key: v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('tools.go') }}-${{ hashFiles('go.sum') }}
restore-keys: |
v1-build-${{ runner.os }}-
v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-${{ hashFiles('tools.go') }}-
v1-go-with-tools-${{ runner.os }}-${{ matrix.go }}-

# Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Create GitHub Release
name: Create GitHub release

on:
push:
tags: v*
tags: [v*]

jobs:

Expand All @@ -15,11 +15,11 @@ jobs:

- name: Generate changelog
id: changelog
uses: metcalfc/changelog-generator@v4.3.1
uses: metcalfc/changelog-generator@v4
with:
myToken: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/Generate-TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Generate TOC

on:
push:
branches: master
branches: [master]
pull_request:
branches: master
types: [ opened, synchronize, reopened, closed ]
branches: [master]
types: [opened, synchronize, reopened, closed]

jobs:

Expand Down
24 changes: 6 additions & 18 deletions .github/workflows/Lint-PR-name.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Lint PR name

on:
pull_request:
branches: master
types: [ opened, edited, synchronize, reopened ]
branches: [master]
types: [opened, edited, synchronize, reopened]

jobs:

Expand All @@ -14,20 +14,8 @@ jobs:
- uses: actions/checkout@v4

- name: Install dependencies
run: npm install @commitlint/config-conventional
run: npm install @commitlint/config-conventional@16.0.0

# https://github.com/JulienKode/pull-request-name-linter-action/issues/224#issuecomment-1672053886

#- uses: JulienKode/pull-request-name-linter-action@v0.5.0
# with:
# configuration-path: '.github/commitlint.config.js'

- name: Set configuration
run: |
echo "module.exports = {extends: ['@commitlint/config-conventional'], rules: { 'subject-case': [0,'always',['sentence-case']],'header-max-length': [2, 'always', 120], 'body-max-line-length': [0, 'always', 120] }};" > commitlint.config.js

- name: Lint the PR title
run: |
echo "${PR_TITLE}" | npx --yes commitlint
env:
PR_TITLE: '${{ github.event.pull_request.title }}'
- uses: JulienKode/pull-request-name-linter-action@v0.5.0
with:
configuration-path: '.github/commitlint.config.js'
93 changes: 0 additions & 93 deletions .github/workflows/codeql.yml

This file was deleted.

Loading
Loading