File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : builds
2+
3+ on :
4+ push :
5+ branches : main
6+ pull_request :
7+ branches : main
8+
9+ jobs :
10+ build :
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ fail-fast : false
14+ matrix :
15+ os : [ubuntu-latest]
16+ steps :
17+ - uses : actions/checkout@v2
18+ - name : Cache python modules
19+ uses : satackey/action-docker-layer-caching@v0.0.11
20+ # Ignore the failure of a step and avoid terminating the job.
21+ continue-on-error : true
22+ - name : Build docker
23+ run : docker build . -t header-validator:py3.8.13-alpine
Original file line number Diff line number Diff line change 1+ name : tests
2+
3+ on :
4+ push :
5+ branches : main
6+ pull_request :
7+ branches : main
8+
9+ jobs :
10+ run-action :
11+ runs-on : ${{ matrix.os }}
12+ strategy :
13+ fail-fast : false
14+ matrix :
15+ os : [ubuntu-latest]
16+ steps :
17+ - uses : actions/checkout@v2
18+ - name : Cache python modules
19+ uses : satackey/action-docker-layer-caching@v0.0.11
20+ # Ignore the failure of a step and avoid terminating the job.
21+ continue-on-error : true
22+ - name : Build docker
23+ run : docker build . -t header-validator:py3.8.13-alpine
24+ - name : Run action
25+ run : docker run header-validator:py3.8.13-alpine Apache-2.0 'François-Guillaume Fernandez' 2022 src/ __init__.py
Original file line number Diff line number Diff line change 11FROM python:3.8.13-alpine
22
3+ ENV PYTHONDONTWRITEBYTECODE 1
4+ ENV PYTHONUNBUFFERED 1
5+
36COPY entrypoint.sh /entrypoint.sh
4- COPY validate_headers.py /validate_headers.py
5- COPY supported-licenses.json /supported-licenses.json
7+ COPY src/ validate_headers.py /validate_headers.py
8+ COPY src/ supported-licenses.json /supported-licenses.json
69
710ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 11# Header validator for your Python files
22
3+ <p align =" center " >
4+ <a href =" https://github.com/frgfm/validate-python-headers/actions?query=workflow%3Abuilds " >
5+ <img alt="CI Status" src="https://img.shields.io/github/workflow/status/frgfm/validate-python-headers/builds?label=CI&logo=github&style=flat-square">
6+ </a >
7+ <a href =" https://github.com/ambv/black " >
8+ <img src="https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square" alt="black">
9+ </a >
10+ <a href =" https://www.codacy.com/gh/frgfm/validate-python-headers/dashboard?utm_source=github.com& ; utm_medium=referral& ; utm_content=frgfm/validate-python-headers& ; utm_campaign=Badge_Grade " ><img src =" https://app.codacy.com/project/badge/Grade/4e50e872d9fd4a378b696bdc0aea9301 " /></a >
11+ <p align =" center " >
12+ <img alt =" GitHub release (latest by date) " src =" https://img.shields.io/github/v/release/frgfm/validate-python-headers " >
13+ <img alt =" GitHub " src =" https://img.shields.io/github/license/frgfm/validate-python-headers " >
14+ </p >
15+
16+
317This action checks the copyright and license notices in the headers of your Python files.
418
519## Inputs
Original file line number Diff line number Diff line change 11#! /bin/sh -l
22set -eax
33
4- python /validate_headers.py $1 $2 $3 --folders $4 --ignores $5
4+ python /validate_headers.py " ${1} " " ${2} " $3 --folders $4 --ignores $5
Original file line number Diff line number Diff line change 11[tool .mypy ]
2- files = " *.py"
2+ files = " src/ *.py"
33show_error_codes = true
44pretty = true
55warn_unused_ignores = true
@@ -11,7 +11,7 @@ implicit_reexport = false
1111[tool .isort ]
1212profile = " black"
1313line_length = 120
14- src_paths = [" . " ]
14+ src_paths = [" src " ]
1515skip_glob = " **/__init__.py"
1616known_third_party = []
1717
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments