Files
ormar/.github/workflows/test-package.yml
dependabot[bot] 8fca2efad7 build(deps): bump paambaati/codeclimate-action from 3.1.1 to 3.2.0 (#898)
Bumps [paambaati/codeclimate-action](https://github.com/paambaati/codeclimate-action) from 3.1.1 to 3.2.0.
- [Release notes](https://github.com/paambaati/codeclimate-action/releases)
- [Changelog](https://github.com/paambaati/codeclimate-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/paambaati/codeclimate-action/compare/v3.1.1...v3.2.0)

---
updated-dependencies:
- dependency-name: paambaati/codeclimate-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-24 02:48:59 +00:00

76 lines
2.3 KiB
YAML

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: build
on:
push:
branches-ignore:
- 'gh-pages'
pull_request:
branches: [ master ]
jobs:
tests:
name: "Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'collerek/ormar'
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
fail-fast: false
services:
mysql:
image: mysql:5.7
env:
MYSQL_USER: username
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testsuite
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
postgres:
image: postgres:10.8
env:
POSTGRES_USER: username
POSTGRES_PASSWORD: password
POSTGRES_DB: testsuite
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install poetry==1.1.11
poetry install --extras "all"
env:
POETRY_VIRTUALENVS_CREATE: false
- name: Run mysql
env:
DATABASE_URL: "mysql://username:password@127.0.0.1:3306/testsuite"
run: bash scripts/test.sh
- name: Run postgres
env:
DATABASE_URL: "postgresql://username:password@localhost:5432/testsuite"
run: bash scripts/test.sh
- name: Run sqlite
env:
DATABASE_URL: "sqlite:///testsuite"
run: bash scripts/test.sh
- run: mypy ormar tests
- name: Upload coverage
uses: codecov/codecov-action@v3.1.1
- name: Test & publish code coverage
uses: paambaati/codeclimate-action@v3.2.0
if: github.event.pull_request.head.repo.full_name == 'collerek/ormar'
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_COVERAGE_TOKEN }}