Fix GitHub actions. #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test tap-myqsql | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
push: | |
branches: [main] | |
workflow_dispatch: | |
inputs: {} | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
services: | |
mysqldb: | |
image: mysql | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: melty | |
ports: | |
- 3306:3306 | |
env: | |
PIP_CONSTRAINT: .github/workflows/constraints.txt | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Set up MySQL container | |
run: | | |
docker compose -f docker-compose.yml up -d | |
- uses: isbang/[email protected] | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip | |
run: | | |
pip install pip | |
pip --version | |
- name: Install Poetry | |
run: | | |
pip install poetry | |
poetry --version | |
- name: Install dependencies | |
run: | | |
poetry install | |
- name: Run pytest | |
run: | | |
poetry run pytest | |
- name: Run lint | |
run: | | |
poetry run tox -e lint |