diff options
author | Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> | 2021-02-28 17:32:54 +0100 |
---|---|---|
committer | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2021-05-22 16:35:58 +0200 |
commit | b3fc18ddf0986f55d0b6684c787fa52226df70e5 (patch) | |
tree | 804e5a3fcc8853cde0b2274f95f449b57214f819 | |
parent | bbe4227077408561107a378fe24cac3ca1a78139 (diff) | |
download | psycopg2-b3fc18ddf0986f55d0b6684c787fa52226df70e5.tar.gz |
ci: first stab at running CI as github actions
Props to Adam Chainz for sharing its setup.
-rw-r--r-- | .github/workflows/docs.yml | 17 | ||||
-rw-r--r-- | .github/workflows/tests.yml | 37 |
2 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..5cf7f81 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,17 @@ +name: Build documentation + +on: + push: + branches: [ master ] + +jobs: + docs: + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: install requirements + run: pip install --upgrade pip setuptools wheel + - name: run tests + run: TRAVIS_PYTHON_VERSION=3.6 ./scripts/travis_update_docs.sh diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..4775380 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,37 @@ +name: Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + tests: + name: Python ${{ matrix.python-version }} + runs-on: ubuntu-18.04 + + strategy: + fail-fast: false + matrix: + python-version: + - 2.7 + - 3.6 + - 3.7 + - 3.8 + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: install requirements + run: pip install --upgrade pip setuptools wheel + - name: install local project + run: pip install . + - name: cleanup local egg info + run: rm -rf psycopg2.egg-info + - name: setup test databases + run: sudo ./scripts/travis_prepare.sh + - name: run tests + run: ./scripts/travis_test.sh |