Skip to content

Commit

Permalink
chore: restore Checks action
Browse files Browse the repository at this point in the history
  • Loading branch information
hpidcock committed Aug 14, 2024
1 parent 4f42645 commit c800a22
Showing 1 changed file with 2 additions and 74 deletions.
76 changes: 2 additions & 74 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,80 +47,8 @@ jobs:
- name: Download Go Dependencies
run: go mod download

- name: "Static Analysis: Copyright"
run: |
STATIC_ANALYSIS_JOB=test_copyright make static-analysis
shell: bash

- name: "Static Analysis: Shell Check"
run: |
STATIC_ANALYSIS_JOB=test_static_analysis_shell make static-analysis
shell: bash

- name: "Static Analysis: Go Check"
run: |
# Explicitly set GOROOT to avoid golangci-lint/issues/3107
export "GOROOT=$(go env GOROOT)"
export "CGO_LDFLAGS=-L$(pwd)/_deps/juju-dqlite-static-lib-deps -luv -lraft -ldqlite -llz4 -lsqlite3"
STATIC_ANALYSIS_JOB=test_static_analysis_go make static-analysis
shell: bash
env:
CGO_ENABLED: 1
CGO_LDFLAGS_ALLOW: "(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"

- name: "Static Analysis: Python Check"
run: |
STATIC_ANALYSIS_JOB=test_static_analysis_python make static-analysis
shell: bash

schema:
name: Schema
runs-on: [self-hosted, linux, arm64, aws, large]
if: github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check if there is anything to test
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
schema:
- 'apiserver/facades/schema.json'
- 'generate/schemagen/**'
- '**.go'
- 'go.mod'
- '.github/workflows/static-analysis.yml'
- 'Makefile'
- 'tests/main.sh'
- 'tests/includes/**'
- 'tests/suites/static_analysis/schema.sh'
- name: Set up Go
if: steps.filter.outputs.schema == 'true'
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true

- name: Install Dependencies
if: steps.filter.outputs.schema == 'true'
run: |
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
- name: Schema Check
if: steps.filter.outputs.schema == 'true'
run: |
STATIC_ANALYSIS_JOB=test_schema make static-analysis
shell: bash
- name: "Static Analysis"
run: make static-analysis

conventional-commits:
name: Check conventional commits
Expand Down

0 comments on commit c800a22

Please sign in to comment.