Dev transform UI #271
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: ci | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: setup nodejs | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "16" | |
- name: setup dependencies | |
run: | | |
pip install poetry | |
poetry lock --no-update | |
poetry install | |
- name: run test | |
run: | | |
poetry run pytest -xs tests/ | |
- name: build www | |
working-directory: www | |
run: | | |
yarn install | |
yarn build | |
env: | |
# so create-react-app doesn't treat warning as error. | |
CI: false | |
- name: build wheels | |
run: poetry build | |
- name: upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
release: | |
runs-on: ubuntu-latest | |
if: "startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/master') || startswith(github.ref, 'refs/heads/dev-ci')" | |
needs: [build] | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: wheels | |
path: dist | |
- name: setup python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: pypi publish | |
run: | | |
pip install twine | |
twine upload --skip-existing dist/* -u $PYPI_USER -p $PYPI_PWD | |
env: | |
PYPI_USER: __token__ | |
PYPI_PWD: ${{ secrets.PYPI_TOKEN }} |