Skip to content

deps(github-actions): Bump the github-actions group across 1 directory with 5 updates #173

deps(github-actions): Bump the github-actions group across 1 directory with 5 updates

deps(github-actions): Bump the github-actions group across 1 directory with 5 updates #173

Workflow file for this run

name: "Run Code Checks"
on:
push:
branches: [main]
pull_request:
types: [opened, synchronize]
schedule:
- cron: 30 1 * * 0
permissions:
contents: read
packages: read
jobs:
check-code-quality:
name: Check Code Quality
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
# Lint and Format everything but Python
- name: Lint Code Base
uses: super-linter/super-linter/[email protected]
env:
VALIDATE_ALL_CODEBASE: true
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
LINTER_RULES_PATH: .github/super-linter-configurations
YAML_ERROR_ON_WARNING: true
VALIDATE_PYTHON_BLACK: false
VALIDATE_PYTHON_FLAKE8: false
VALIDATE_PYTHON_ISORT: false
VALIDATE_PYTHON_MYPY: false
VALIDATE_PYTHON_PYLINT: false
VALIDATE_PYTHON_RUFF: false
VALIDATE_PYTHON_PYINK: false
VALIDATE_NATURAL_LANGUAGE: false
GITHUB_ACTIONS_COMMAND_ARGS: "-ignore '.branding.icon.'"
check-python-code-format-and-quality:
name: Check Python Code Format and Quality
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Dependencies
uses: ./.github/actions/setup-dependencies
- name: Check Python Code Quality (Ruff)
run: just ruff-lint
env:
RUFF_OUTPUT_FORMAT: "github"
- name: Check Python Code Format (Ruff)
run: just ruff-format
env:
RUFF_OUTPUT_FORMAT: "github"
- name: Check Python Code for Dead Code (Vulture)
run: just vulture
upload-ruff-analysis-results:
name: Upload Ruff Analysis Results
runs-on: ubuntu-latest
permissions:
statuses: write
security-events: write
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Python Dependencies
uses: ./.github/actions/setup-dependencies
- name: Check Python Code Quality (Ruff)
run: just ruff-lint
env:
RUFF_OUTPUT_FORMAT: "sarif"
RUFF_OUTPUT_FILE: "ruff-results.sarif"
continue-on-error: true
- name: Upload Ruff analysis results to GitHub
uses: github/codeql-action/[email protected]
with:
sarif_file: ruff-results.sarif
wait-for-processing: true
run-codeql-analysis:
name: CodeQL Analysis
runs-on: ubuntu-latest
permissions:
statuses: write
security-events: write
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Initialize CodeQL
uses: github/codeql-action/[email protected]
with:
languages: python
queries: security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/[email protected]
check-markdown-links:
name: Check Markdown links
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- name: Checkout Repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Check Markdown links
uses: UmbrellaDocs/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
config_file: .github/other-configurations/.linkspector.yml
reporter: github-pr-review
fail_on_error: true
filter_mode: nofilter
check-justfile-format:
name: Check Justfile Format
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- name: Checkout Repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Just
uses: extractions/setup-just@v2
- name: Check Justfile Format
run: just format-check
docker-build:
name: Build Docker Image
runs-on: ubuntu-latest
permissions:
statuses: write
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up Just
uses: extractions/setup-just@v2
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build Docker Image
run: just docker-build
run-scorecard-analysis:
name: Scorecard Analysis
runs-on: ubuntu-latest
permissions:
security-events: write
id-token: write
contents: read
actions: read
issues: read
pull-requests: read
checks: read
steps:
- name: "Checkout code"
uses: actions/[email protected]
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/[email protected]
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- name: "Upload to code-scanning"
uses: github/codeql-action/[email protected]
with:
sarif_file: results.sarif
run-code-limit:
name: Run Code Limit
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: "Run Code Limit"
uses: getcodelimit/codelimit-action@v1
unit-test:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Dependencies
uses: ./.github/actions/setup-dependencies
- name: Run Unit Tests
run: just unit-test
- name: Override Coverage Source Path for SonarCloud
run: sed -i "s/<source>\/home\/runner\/work\/github-stats-analyser\/github-stats-analyser<\/source>/<source>\/github\/workspace<\/source>/g" /home/runner/work/github-stats-analyser/github-stats-analyser/coverage.xml
- name: SonarCloud Scan
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run-local-action:
name: Run Local Action
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Dependencies
uses: ./.github/actions/setup-dependencies
- name: Run GitHub Stats Analyser
uses: ./.github/actions/local
with:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
REPOSITORY_OWNER: ${{ github.REPOSITORY_OWNER }}
- name: Download GitHub Action Summary
uses: austenstone/[email protected]
with:
name: GITHUB_ACTION_SUMMARY
create-pdf: false
create-pdf-artifact: false
create-md: true
create-md-artifact: true
- name: Upload Artifact
uses: actions/[email protected]
with:
name: repository_statistics
path: repository_statistics.json
validate-schema:
name: Validate Schema
runs-on: ubuntu-latest
needs: run-local-action
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Dependencies
uses: ./.github/actions/setup-dependencies
- name: Download Artifact
uses: actions/[email protected]
with:
name: repository_statistics
path: tests/schema_validation
- name: Validate Schema
run: just validate-schema
test-github-summary:
name: Test GitHub Summary
runs-on: ubuntu-latest
needs: run-local-action
steps:
- name: Checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Setup Dependencies
uses: ./.github/actions/setup-dependencies
- name: Download Artifact
uses: actions/[email protected]
with:
name: md
path: tests/github_summary
- name: Test GitHub Summary
run: just test-github-summary