lint #146
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: prs | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.10.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: bats-based CLI tests | |
run: make clitests | |
- name: lint (flake8, black, mypy...) | |
run: make lint | |
- name: test main Dockerfile (builds jgehrcke/github-repo-stats:local) | |
run: make action-image | |
- name: test entrypoint.sh in action container | |
env: | |
INPUT_GHTOKEN: ${{ secrets.ghrs_github_api_token }} | |
INPUT_DATABRANCH: github-repo-stats | |
INPUT_REPOSITORY: jgehrcke/github-repo-stats | |
INPUT_GHPAGESPREFIX: none | |
GHRS_DATA_REPOSPEC_OVERRIDE: jgehrcke/ghrs-test | |
GHRS_TESTING: true | |
GHRS_FILES_ROOT_PATH: / | |
run: | | |
docker run \ | |
--entrypoint "/bin/bash" \ | |
-e GITHUB_REPOSITORY \ | |
-e GITHUB_WORKFLOW \ | |
-e INPUT_GHTOKEN \ | |
-e INPUT_DATABRANCH \ | |
-e INPUT_REPOSITORY \ | |
-e INPUT_GHPAGESPREFIX \ | |
-e GHRS_DATA_REPOSPEC_OVERRIDE \ | |
-e GHRS_TESTING \ | |
-e GHRS_FILES_ROOT_PATH \ | |
-v $(pwd):/cwd \ | |
jgehrcke/github-repo-stats:local -c \ | |
'set -o errexit && mkdir /tmp/testrun && cd /tmp/testrun && | |
bash /cwd/entrypoint.sh | |
' | |
- name: test fetch.py in action container | |
env: | |
GHRS_GITHUB_API_TOKEN: ${{ secrets.ghrs_github_api_token }} | |
run: | | |
docker run \ | |
--entrypoint "/bin/bash" \ | |
-e GHRS_GITHUB_API_TOKEN \ | |
-v $(pwd):/cwd \ | |
jgehrcke/github-repo-stats:local -c \ | |
'set -o errexit && cd /cwd | |
python fetch.py jgehrcke/github-repo-stats | |
' | |
- name: test analyze.py in action container | |
env: | |
GHRS_GITHUB_API_TOKEN: ${{ secrets.ghrs_github_api_token }} | |
run: | | |
docker run \ | |
--entrypoint "/bin/bash" \ | |
-e GHRS_GITHUB_API_TOKEN \ | |
-v $(pwd):/cwd \ | |
jgehrcke/github-repo-stats:local -c \ | |
'set -o errexit && cd /cwd | |
python fetch.py jgehrcke/github-repo-stats | |
python analyze.py jgehrcke/github-repo-stats _ghrs_jgehrcke_github-repo-stats | |
cat *_report/*_report.md | |
' | |
- name: test building new base image (base.Dockerfile) | |
run: make new-base-image |