Skip to content

test

test #366

Workflow file for this run

name: test
on:
pull_request:
schedule:
- cron: '00 15 * * FRI' # At 00:00 on every Saturday in JST
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version:
- '3.8'
- '3.10'
- '3.12'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache
id: pip-cache
run: |
python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)"
- uses: actions/cache@v1
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.py') }}-${{ hashFiles('setup.cfg') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip3 install --upgrade setuptools
pip3 install .[dev]
- name: Run tests
run: |
oj -h
pytest -v tests/*.py
shell: bash