add Github actions file #1
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, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: python:3.11.9 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build | |
run: echo "build" | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
container: python:3.11.9 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.11.9 | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install dependencies | |
run: | | |
python --version | |
pip --version | |
pip install virtualenv | |
virtualenv venv | |
source venv/bin/activate | |
pip install tox | |
pip install -r requirements.txt | |
- name: Run tests | |
run: tox |