forked from jgehrcke/github-repo-stats
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (74 loc) · 2.59 KB
/
prs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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