refactoring call parsing #8
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: Build Actions | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Python | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Load Cached Poetry | |
id: cached-poetry | |
uses: actions/cache@v3 | |
with: | |
path: /home/runner/.local | |
key: poetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }} | |
- name: Add Cached Poetry to PATH | |
if: steps.cached-poetry.outputs.cache-hit == 'true' | |
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
- name: Install Poetry | |
if: steps.cached-poetry.outputs.cache-hit != 'true' | |
uses: snok/install-poetry@v1 | |
- name: Load Cached Virtualenv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install Dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: | | |
poetry config virtualenvs.in-project true | |
poetry install --no-interaction --all-extras | |
lint: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Load Cached Virtualenv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Load Cached Poetry | |
id: cached-poetry | |
uses: actions/cache@v3 | |
with: | |
path: /home/runner/.local | |
key: poetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }} | |
- name: Add Cached Poetry to PATH | |
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
- name: Run Pre-Commit | |
run: poetry run pre-commit run --all-files | |
test: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Load Cached Virtualenv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Load Cached Poetry | |
id: cached-poetry | |
uses: actions/cache@v3 | |
with: | |
path: /home/runner/.local | |
key: poetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }} | |
- name: Add Cached Poetry to PATH | |
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
- name: Run Unit Tests | |
run: poetry run pytest -v tests/ | |
- name: Run Doctests | |
run: poetry run pytest --doctest-modules starknet_abi/ | |
validate-docs: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up python | |
id: setup-python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
- name: Load Cached Virtualenv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Load Cached Poetry | |
id: cached-poetry | |
uses: actions/cache@v3 | |
with: | |
path: /home/runner/.local | |
key: poetry-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }} | |
- name: Add Cached Poetry to PATH | |
run: echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
- name: Build Docs | |
run: poetry run sphinx-build -b html docs/source _build | |
- name: Check Documentation Links | |
run: poetry run sphinx-build -b linkcheck docs/source _build |