|
|
@ -4,17 +4,10 @@ name: ChangeDetection.io App Test
|
|
|
|
on: [push, pull_request]
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
jobs:
|
|
|
|
test-application:
|
|
|
|
lint-code:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- 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
|
|
|
|
- name: Lint with flake8
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
pip3 install flake8
|
|
|
|
pip3 install flake8
|
|
|
@ -23,6 +16,18 @@ jobs:
|
|
|
|
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
|
|
|
# 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
|
|
|
|
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
|
|
|
|
- name: Spin up ancillary testable services
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
|
|
|
|
|
|
|
@ -38,7 +43,7 @@ jobs:
|
|
|
|
- name: Build changedetection.io container for testing
|
|
|
|
- name: Build changedetection.io container for testing
|
|
|
|
run: |
|
|
|
|
run: |
|
|
|
|
# Build a changedetection.io container and start testing inside
|
|
|
|
# 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
|
|
|
|
# Debug info
|
|
|
|
docker run test-changedetectionio bash -c 'pip list'
|
|
|
|
docker run test-changedetectionio bash -c 'pip list'
|
|
|
|
|
|
|
|
|
|
|
|