This repository has been archived by the owner on Dec 1, 2023. It is now read-only.
Update README.md (#355) #979
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: nile test and release | |
on: | |
pull_request: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- "v*" | |
release: | |
types: [published] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Add '3.10-dev' once frozendict issue is resolved | |
# See https://github.com/starkware-libs/cairo-lang/issues/38 | |
python_version: [ '3.9' ] | |
os: [ubuntu-latest] | |
name: ${{ matrix.os }} - Python ${{ matrix.python_version }} | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python_version }} | |
architecture: x64 | |
- run: python -m pip install -U setuptools | |
- run: python -m pip install --pre -e .[testing] | |
- run: tox -e lint | |
- run: tox -- --disable-warnings | |
dist: | |
runs-on: ubuntu-latest | |
needs: [test] | |
name: Python sdist/wheel | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.9" | |
- run: python -m pip install -U setuptools | |
- run: python -m pip install --pre -e .[testing] | |
- name: Build package | |
run: tox -e build | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: dist | |
path: dist | |
dist_upload: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
needs: [dist] | |
name: Upload to PyPi | |
steps: | |
- uses: actions/download-artifact@v2 | |
with: | |
name: dist | |
path: dist | |
- name: Publish package to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_token }} |