build the server #376
Workflow file for this run
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: Build and Test | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.10.13 | |
- name: Cache Pip | |
id: cache-pip | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cache | |
key: venv-${{ runner.os }}-${{ hashFiles('*requirements.txt') }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt -r test-requirements.txt | |
- name: Lint with flake8 and black | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
flake8 score/ | |
black score/ --check | |
- name: Test | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
py.test score/ -v |