From 22ad36fb09f7c1398c6dea3ce14d2ebfc58529d0 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Sun, 11 Aug 2024 18:04:21 +0100 Subject: [PATCH] Reorganise a little to put scripts in bin --- .github/workflows/test.yml | 7 ++----- coverage.sh => bin/coverage.sh | 0 run.sh => bin/run.sh | 0 bin/test.sh | 7 +++++++ 4 files changed, 9 insertions(+), 5 deletions(-) rename coverage.sh => bin/coverage.sh (100%) rename run.sh => bin/run.sh (100%) create mode 100755 bin/test.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b041b56..3ccdaff 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,12 +18,9 @@ jobs: run: | python -m pip install --upgrade pip python -m pip install -r requirements.txt - - name: Analysing the code with flake8 + - name: Run tests run: | - flake8 --max-line-length 120 $(git ls-files '*.py') - - name: Run tests with pytest - run: | - pytest + bash bin/test.sh - name: Update release branch if: github.ref == 'refs/heads/main' run: | diff --git a/coverage.sh b/bin/coverage.sh similarity index 100% rename from coverage.sh rename to bin/coverage.sh diff --git a/run.sh b/bin/run.sh similarity index 100% rename from run.sh rename to bin/run.sh diff --git a/bin/test.sh b/bin/test.sh new file mode 100755 index 0000000..e23c9b8 --- /dev/null +++ b/bin/test.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash + +# Check formatting and linting +flake8 --max-line-length 120 $(git ls-files '*.py') + +# Run pytest +pytest \ No newline at end of file