cleanup #68
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
paths: | |
- 'src/**' | |
- '.github/actions/test.yml' | |
jobs: | |
tests: | |
name: ✅ Run tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
with: | |
# Disabling shallow clone is recommended for improving relevancy of reporting | |
fetch-depth: 0 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# - uses: actions/cache@v2 | |
# with: | |
# path: ~/.cache/pip | |
# key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
# restore-keys: | | |
# ${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
pip install .[test] | |
- name: Prepare data and train the model | |
run: | | |
./prepare.sh | |
python src/train.py | |
- name: Run tests | |
run: | | |
pytest -s | |
codeql: | |
name: 🔎 CodeQL analysis | |
runs-on: ubuntu-latest | |
permissions: | |
security-events: write # required for all workflows | |
actions: read # only required for workflows in private repositories | |
contents: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: python | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |