split build from lint, try 3.10 as build arg

This commit is contained in:
dgtlmoon
2024-06-16 15:55:51 +02:00
parent bce02f9c82
commit db48cc64f5
2 changed files with 18 additions and 10 deletions
+14 -9
View File
@@ -4,8 +4,21 @@ name: ChangeDetection.io App Test
on: [push, pull_request]
jobs:
lint-code:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Lint with flake8
run: |
pip3 install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# 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
@@ -15,14 +28,6 @@ jobs:
with:
python-version: '3.11'
- name: Lint with flake8
run: |
pip3 install flake8
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# 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
- 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'