mirror of
https://github.com/tubearchivist/tubearchivist-metrics.git
synced 2025-07-02 00:11:09 +00:00
38 lines
760 B
YAML
38 lines
760 B
YAML
name: Lint, Test, Build, and Push Docker Image
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
tags:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Cache pre-commit environment
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cache/pre-commit
|
|
key: ${{ runner.os }}-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pre-commit-
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install pre-commit
|
|
pre-commit install
|
|
|
|
- name: Run pre-commit
|
|
run: |
|
|
pre-commit run --all-files
|