-
Notifications
You must be signed in to change notification settings - Fork 28
61 lines (55 loc) · 1.58 KB
/
test-and-deploy.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
name: Test & Deploy Numerai CLI
on:
workflow_dispatch:
push:
concurrency: deploy-numerai-cli-${{ github.ref }}
jobs:
build-python36:
name: Build Python 3.6
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "3.6.15"
- run: pip install .
- run: numerai copy-example
- run: test -e tournament-python3/predict.py
build-python37:
name: Build Python 3.7
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "3.7.9"
- run: pip install .
- run: numerai copy-example
- run: test -e tournament-python3/predict.py
build-docker:
name: Build Docker
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: |
cd numerai/examples/tournament-python3 \
&& docker build -t example-python \
--build-arg NUMERAI_PUBLIC_ID=test \
--build-arg NUMERAI_SECRET_KEY=test .
pypi-release:
name: PyPI Release
runs-on: ubuntu-20.04
if: github.ref == 'refs/heads/master'
needs: [build-python36, build-python37, build-docker]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: "3.7.9"
- run: pip install twine wheel
- run: python setup.py sdist bdist_wheel
- run: |
python -m twine upload \
-u __token__ \
-p ${{ secrets.PYPI_API_KEY }} \
--skip-existing dist/*