Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 2 additions & 76 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,82 +4,8 @@ on:
pull_request:
types: [opened, ready_for_review]
jobs:

code-quality-checks:
runs-on: ubuntu-latest
steps:
- name: Get contents from tip of branch on push
uses: actions/checkout@v4

- name: Set up Node
uses: actions/setup-node@v4
- name: Install Node dependencies
run: npm install
- name: Check for valid JSON
run: grunt jsonreview -v

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Check Python code quality
run: flake8 --exclude docs/conf.py --max-line-length=100

python-tests:
runs-on: ubuntu-latest

# Specify python versions to run
strategy:
matrix:
python: ['3.10', '3.11', '3.12']

steps:
- name: Get contents from tip of branch on push
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install scout package
run: |
python -m pip install --upgrade pip
pip install .
- name: Run tests
run: python -m unittest discover -p '*_test.py' tests/

check-docs:
runs-on: ubuntu-latest
steps:
- name: Get contents from tip of branch on push
uses: actions/checkout@v4
with:
sparse-checkout: |
scout
docs
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install scout package
run: |
python -m pip install --upgrade pip
pip install .
- name: Generate readable configuration file
run: python docs/generate_readable_cfg.py -o config_readable_ci.yml
- name: Compare readable configuration files
run: |
if ! cmp -s docs/config_readable.yml config_readable_ci.yml; then
echo "docs/config_readable.yml is not up to date with scout/supporting_data/config_schema.yml. Update file by running docs/generate_readable_cfg.py"
exit 1
fi

check-PR:
# Check if there is a PR - allows one main workflow with dependency on previous jobs
needs: [code-quality-checks, python-tests, check-docs]
runs-on: ubuntu-latest
outputs:
PR_status: ${{ steps.PR.outputs.pr_found }}
Expand All @@ -95,8 +21,8 @@ jobs:
integration-tests:
needs: [check-PR]
if: |
(needs.check-PR.outputs.PR_status == 'true' && fromJSON(needs.check-PR.outputs.PR).base.ref == 'master') ||
(github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master' && github.event.pull_request.draft == false) ||
(needs.check-PR.outputs.PR_status == 'true') ||
(github.event_name == 'pull_request' && github.event.pull_request.draft == false) ||
github.ref == 'refs/heads/master'
uses: ./.github/workflows/integration_tests.yml
secrets: inherit
3 changes: 1 addition & 2 deletions scout/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@


class LogConfig:
"""Configure the logger
"""
"""Configure the logger"""

@staticmethod
def configure_logging():
Expand Down
Loading