This repository has been archived by the owner on Dec 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 76
69 lines (65 loc) · 1.72 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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 }}