From 12f8980605e4211832ea56021251e213c1300b37 Mon Sep 17 00:00:00 2001 From: Anton Bobrov Date: Tue, 5 Mar 2024 09:51:42 +0000 Subject: [PATCH] setup GH actions --- .coveragerc | 5 +++++ .github/workflows/app.yaml | 43 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .coveragerc create mode 100644 .github/workflows/app.yaml diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..b50d11e --- /dev/null +++ b/.coveragerc @@ -0,0 +1,5 @@ +[run] +source = sqlbind + +[report] +fail_under = 100 diff --git a/.github/workflows/app.yaml b/.github/workflows/app.yaml new file mode 100644 index 0000000..c4c1bad --- /dev/null +++ b/.github/workflows/app.yaml @@ -0,0 +1,43 @@ +name: sqlbind + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python: ["3.6", "3.8", "3.12"] + steps: + - uses: actions/checkout@v4 + - name: prepare + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + - name: deps + run: | + pip install pytest coverage + - name: test + run: python -m coverage run -m pytest + - name: coverage + run: python -m coverage report -m + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: prepare + uses: actions/setup-python@v4 + with: + python-version: "3.12" + - name: deps + run: pip install mypy==1.8.0 + - name: mypy + run: mypy --strict sqlbind