Skip to content

Workflow file for this run

name: test-unstable-workaround
on:
pull_request:
workflow_dispatch:
jobs:
test-unstable-workaround:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
pattern: [unstable]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Get pip cache
id: pip-cache
shell: python
run: |
from pip._internal.locations import USER_CACHE_DIR
import os
with open(os.environ['GITHUB_OUTPUT'], 'a') as f:
print('dir=' + USER_CACHE_DIR)
print('dir=' + USER_CACHE_DIR, file=f)
- uses: actions/cache@v4
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: Load balancing
id: load-balancing
run: |
python -m tests.load_balancer ${{ matrix.pattern }}
- name: Run tests
run: |
oj-api -h
pytest -v ${{ steps.load-balancing.outputs.files }}
env:
YUKICODER_TOKEN: ${{ secrets.YUKICODER_TOKEN }}