Skip to content

Commit ff9e69f

Browse files
author
Kareem Zidane
committed
Deploy with GitHub Actions
1 parent 0674b7c commit ff9e69f

File tree

2 files changed

+46
-30
lines changed

2 files changed

+46
-30
lines changed

.github/workflows/main.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
on: push
2+
jobs:
3+
deploy:
4+
runs-on: ubuntu-latest
5+
services:
6+
mysql:
7+
image: mysql
8+
env:
9+
MYSQL_DATABASE: test
10+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
11+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
12+
ports:
13+
- 3306:3306
14+
postgres:
15+
image: postgres
16+
env:
17+
POSTGRES_USER: postgres
18+
POSTGRES_PASSWORD: postgres
19+
POSTGRES_DB: test
20+
ports:
21+
- 5432:5432
22+
steps:
23+
- uses: actions/checkout@v2
24+
- uses: actions/setup-python@v2
25+
with:
26+
python-version: '3.6'
27+
- name: Setup databases
28+
run: |
29+
python setup.py install
30+
pip install mysqlclient
31+
pip install psycopg2-binary
32+
touch test.db test1.db
33+
- name: Run tests
34+
run: python tests/sql.py
35+
- name: Install pypa/build
36+
run: |
37+
python -m pip install build --user
38+
- name: Build a binary wheel and a source tarball
39+
run: |
40+
python -m build --sdist --wheel --outdir dist/ .
41+
- name: Deploy to PyPI
42+
if: ${{ github.ref == 'refs/heads/main' }}
43+
uses: pypa/gh-action-pypi-publish@release/v1
44+
with:
45+
user: __token__
46+
password: ${{ secrets.PYPI_API_TOKEN }}

.travis.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)