Debian Codegraph @

.github/workflows/python-package.yml

raw symbols SCIP
1 # This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2 # For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3
4 name: Python package
5
6 on:
7 push:
8 branches: [ develop, release/* ]
9 pull_request:
10 branches: [ develop ]
11 schedule:
12 - cron: '27 19 * * *'
13
14 jobs:
15 build:
16
17 runs-on: ubuntu-latest
18 strategy:
19 matrix:
20 python-version: [3.7, 3.8, 3.9, '3.10']
21 database:
22 - pgsql
23 - mysql
24 - sqlite
25 # There's some recursion error here (See #76)
26 steps:
27 - uses: actions/checkout@v2
28 - name: Set up Python ${{ matrix.python-version }}
29 uses: actions/setup-python@v2
30 with:
31 python-version: ${{ matrix.python-version }}
32 - name: Install dependencies
33 run: |
34 python -m pip install --upgrade pip
35 python -m pip install -r test-requirements.txt
36 python -m pip install tox-gh-actions coveralls
37 python -m pip install --upgrade wheel # stop pip complaining about a setup.py install
38 sudo apt-get install python3-dev
39 pip install .
40 - name: Test with tox
41 env:
42 DB: ${{ matrix.database }}
43 GA_PYTHON_VERSION: ${{ matrix.python-version }}
44 run: |
45 . ./github-ci.sh
46 tox --workdir=.
47 services:
48 # Label used to access the service container
49 postgres:
50 # Docker Hub image
51 image: postgres
52 # Provide the password for postgres
53 env:
54 POSTGRES_PASSWORD: postgres
55 # Set health checks to wait until postgres has started
56 options: >-
57 --health-cmd pg_isready
58 --health-interval 10s
59 --health-timeout 5s
60 --health-retries 5
61 ports:
62 # Maps tcp port 5432 on service container to the host
63 - 5432:5432
64 mysql:
65 # Docker Hub image
66 image: mysql
67 # Provide the password for mysql
68 env:
69 MYSQL_ALLOW_EMPTY_PASSWORD: 1
70 MYSQL_USER: test
71 MYSQL_PASSWORD: mysql
72 MYSQL_DATABASE: test
73 ports:
74 # Maps tcp port 3306 on service container to the host
75 - 3306:3306
76
77 dev-deploy:
78 name: Deploy Dev Package to PyPI
79 needs: build
80 if: github.event_name == 'push'
81 && (github.ref == 'refs/heads/develop'
82 || startsWith(github.ref, 'refs/heads/release/'))
83 runs-on: ubuntu-latest
84 steps:
85 - uses: actions/checkout@v2
86 - name: Set up Python 3
87 uses: actions/setup-python@v2
88 with:
89 python-version: 3
90 - name: Install Deploy Dependencies
91 run: pip install wheel twine
92 - name: Deploy
93 run: ./deploy.sh
94 env:
95 TWINE_USERNAME: __token__
96 TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}