Skip to content

Commit 53bf2a8

Browse files
committed
Use consistent folder structure
The other two Python-based actions keep the Python project in a subfolder. This provides a clear separation between the Python project and the GitHub Actions action-specific components. This convention was previously not followed by the report-size-deltas action.
1 parent eb76ee7 commit 53bf2a8

File tree

10 files changed

+7
-7
lines changed

10 files changed

+7
-7
lines changed

.github/workflows/libraries_report-size-deltas.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
30-
pip install --requirement "$GITHUB_WORKSPACE/libraries/report-size-deltas/tests/requirements.txt"
30+
pip install --requirement "$GITHUB_WORKSPACE/libraries/report-size-deltas/reportsizedeltas/tests/requirements.txt"
3131
3232
- name: Lint with flake8
3333
run: |
3434
pip install --quiet flake8
3535
pip install --quiet pep8-naming
36-
flake8 --config "$GITHUB_WORKSPACE/libraries/report-size-deltas/.flake8" --show-source "$GITHUB_WORKSPACE/libraries/report-size-deltas"
36+
flake8 --config "$GITHUB_WORKSPACE/libraries/report-size-deltas/reportsizedeltas/.flake8" --show-source "$GITHUB_WORKSPACE/libraries/report-size-deltas/reportsizedeltas"
3737
3838
- name: Run Python unit tests and report code coverage
3939
run: |
40-
export PYTHONPATH="$GITHUB_WORKSPACE/libraries/report-size-deltas"
41-
coverage run --source="$GITHUB_WORKSPACE/libraries/report-size-deltas" --module pytest "$GITHUB_WORKSPACE/libraries/report-size-deltas/tests"
40+
export PYTHONPATH="$GITHUB_WORKSPACE/libraries/report-size-deltas/reportsizedeltas"
41+
coverage run --source="$GITHUB_WORKSPACE/libraries/report-size-deltas/reportsizedeltas" --module pytest "$GITHUB_WORKSPACE/libraries/report-size-deltas/reportsizedeltas/tests"
4242
# Display code coverage report in workflow run log
4343
coverage report
4444

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM python:3.8.5
22

33
# Copies your code file from your action repository to the filesystem path `/` of the container
4-
COPY reportsizedeltas.py /reportsizedeltas.py
5-
RUN ["chmod", "+x", "reportsizedeltas.py"]
4+
COPY reportsizedeltas /reportsizedeltas
5+
RUN ["chmod", "+x", "/reportsizedeltas/reportsizedeltas.py"]
66

77
# Code file to execute when the docker container starts up
8-
ENTRYPOINT ["python", "/reportsizedeltas.py"]
8+
ENTRYPOINT ["python", "/reportsizedeltas/reportsizedeltas.py"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)