Skip to content

build: bump python3 ubuntu from 20.04 to 22.04 #167

build: bump python3 ubuntu from 20.04 to 22.04

build: bump python3 ubuntu from 20.04 to 22.04 #167

name: CI
on: [push, pull_request]
jobs:
lint:
name: Code Style Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install YAPF
run: |
python -m pip install --upgrade pip
pip install yapf
- name: Check code formatting
run: yapf . -rd
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Cache build dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/tests/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Build sandbox
run: ./build.sh
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r tests/requirements.txt
- name: Run tests
run: pytest -v