Skip to content

Merge pull request #18205 from jack-w-shaw/JUJU-6717_add_stub_service #3047

Merge pull request #18205 from jack-w-shaw/JUJU-6717_add_stub_service

Merge pull request #18205 from jack-w-shaw/JUJU-6717_add_stub_service #3047

name: "Static Analysis"
on:
push:
branches: [2.*, 3.*, 4.*, main]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
# paths:
# DON'T SET - these are "required" so they need to run on every PR
workflow_dispatch:
permissions:
contents: read
jobs:
checks:
name: Checks
runs-on: [self-hosted, linux, arm64, aws, quad-xlarge]
if: github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Install Dependencies
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
sudo add-apt-repository ppa:dqlite/dev -y --no-update
sudo apt-get update
sudo apt-get install -y \
expect \
libdqlite-dev \
libsqlite3-dev \
sqlite3
go install golang.org/x/vuln/cmd/govulncheck@latest
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
sudo curl -sSfL https://github.com/mvdan/sh/releases/download/v3.7.0/shfmt_v3.7.0_linux_$(go env GOARCH) -o /usr/bin/shfmt
sudo chmod +x /usr/bin/shfmt
go install github.com/google/go-licenses@latest
- name: Download Go Dependencies
run: go mod download
- name: "Static Analysis"
run: make static-analysis
sql:
name: SQL
runs-on: [self-hosted, linux, x64, aws, large]
if: github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: "actions/setup-python@v2"
with:
python-version: "3.9"
- name: Install SQLFluff
run: "pip install sqlfluff==3.0.7"
- name: Lint SQL
run: "sqlfluff lint --config .github/.sqlfluff domain/schema/**/sql/*.sql"
conventional-commits:
name: Check conventional commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: wagoid/commitlint-github-action@v6