test #341
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: 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.6, 3.7, 3.8] | |
include: | |
- os: ubuntu-20.04 | |
python-version: 3.6 | |
exclude: | |
- os: ubuntu-latest | |
python-version: 3.6 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
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 |