Skip to content

ci: update workflows #1

ci: update workflows

ci: update workflows #1

Workflow file for this run

---
name: Code Quality
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout repository.
uses: actions/checkout@v4
- name: Set up Python.
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Cache pre-commit hooks.
uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
pre-commit-
- name: Run pre-commit.
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
- name: Send notification to Discord.
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
golangci-lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository.
uses: actions/checkout@v4
- name: Set up Go.
uses: actions/setup-go@v5
with:
go-version: '1.20'
cache: false
- name: Run golangci-lint.
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6.1.1
with:
version: latest
args: --timeout=5m
- name: Send notification to Discord.
uses: sarisia/actions-status-discord@b8381b25576cb341b2af39926ab42c5056cc44ed # v1.15.5
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}