|
|
|
@ -4,17 +4,10 @@ name: ChangeDetection.io App Test
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
test-application:
|
|
|
|
|
lint-code:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
# Mainly just for link/flake8
|
|
|
|
|
- name: Set up Python 3.11
|
|
|
|
|
uses: actions/setup-python@v5
|
|
|
|
|
with:
|
|
|
|
|
python-version: '3.11'
|
|
|
|
|
|
|
|
|
|
- name: Lint with flake8
|
|
|
|
|
run: |
|
|
|
|
|
pip3 install flake8
|
|
|
|
@ -23,6 +16,18 @@ jobs:
|
|
|
|
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
|
|
|
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
|
|
|
|
|
|
|
|
|
test-application:
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
needs: lint-code
|
|
|
|
|
steps:
|
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
|
|
# Mainly just for link/flake8
|
|
|
|
|
- name: Set up Python 3.11
|
|
|
|
|
uses: actions/setup-python@v5
|
|
|
|
|
with:
|
|
|
|
|
python-version: '3.11'
|
|
|
|
|
|
|
|
|
|
- name: Spin up ancillary testable services
|
|
|
|
|
run: |
|
|
|
|
|
|
|
|
|
@ -38,7 +43,7 @@ jobs:
|
|
|
|
|
- name: Build changedetection.io container for testing
|
|
|
|
|
run: |
|
|
|
|
|
# Build a changedetection.io container and start testing inside
|
|
|
|
|
docker build --build-arg LOGGER_LEVEL=TRACE -t test-changedetectionio .
|
|
|
|
|
docker build --build-arg PYTHON_VERSION=3.10 --build-arg LOGGER_LEVEL=TRACE -t test-changedetectionio .
|
|
|
|
|
# Debug info
|
|
|
|
|
docker run test-changedetectionio bash -c 'pip list'
|
|
|
|
|
|
|
|
|
|