Skip to content

General update

General update #8

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Run PyTest
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
pytest_image:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build Docker Image
run: docker build -t sai:latest -f Dockerfile .
- name: Run PyTest in Docker Image
run: |
export LOCAL_USER=$(whoami)
export LOCAL_USER_ID=$(id -u)
export PYTHON=/sai/bin/python
docker run --rm --volume ${PWD}:/workdir -e PYTHON -e LOCAL_USER_ID -e LOCAL_USER -t sai:latest bash scripts/pytest.sh
pytest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies and test
run: |
sudo bash scripts/install-system-packages.sh
pip install --upgrade pip virtualenv
virtualenv sai
source "sai/bin/activate"
make install
make pytest