Skip to content

update readme

update readme #3

Workflow file for this run

name: CI/CD
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13
env:
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run tests
run: |
pytest --cov=schema_analyzer tests/
coverage xml
- name: Upload coverage
uses: codecov/codecov-action@v2
- name: Lint
run: |
flake8 schema_analyzer tests
black --check schema_analyzer tests
mypy schema_analyzer
build:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- name: Build Docker image
run: docker build -t schema-analyzer .
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Push Docker image
run: |
docker tag schema-analyzer ${{ secrets.DOCKER_HUB_USERNAME }}/schema-analyzer:latest
docker push ${{ secrets.DOCKER_HUB_USERNAME }}/schema-analyzer:latest