fix calling convert_questions.py from convert_questions_batch.py #15
Workflow file for this run
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: Main Workflow | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
release: | |
types: [published] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10", "3.11"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
virtualenvs-path: .venv | |
installer-parallel: true | |
- name: Cache Poetry dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry | |
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }} | |
restore-keys: | | |
${{ runner.os }}-poetry- | |
- name: Install dependencies | |
run: | | |
poetry install --with dev | |
- name: Run ruff check | |
run: | | |
source .venv/bin/activate | |
ruff check | |
- name: Run ruff format check | |
run: | | |
source .venv/bin/activate | |
ruff format --check | |
publish: | |
needs: [lint] | |
if: github.ref_type == 'tag' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
virtualenvs-path: .venv | |
installer-parallel: true | |
- name: Install dependencies | |
run: | | |
poetry install --no-dev | |
- name: Publish to PyPI | |
run: | | |
poetry config pypi-token.pypi ${{ secrets.PYPI_API_TOKEN }} | |
poetry publish --build |