Skip to content

Merge pull request #74 from devind-team/develop #47

Merge pull request #74 from devind-team/develop

Merge pull request #74 from devind-team/develop #47

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Setup Poetry
uses: Gr1N/setup-poetry@v8
- name: Install dependencies
run: poetry install
- name: Run linter
run: poetry run flake8
test:
name: Test
needs: [lint]
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_DB: graphene_django_filter
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Setup Poetry
uses: Gr1N/setup-poetry@v8
- name: Install dependencies
run: poetry install
- name: Run tests
run: poetry run python manage.py test
coverage:
name: Coverage
needs: [test]
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_DB: graphene_django_filter
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Setup Poetry
uses: Gr1N/setup-poetry@v8
- name: Install dependencies
run: poetry install
- name: Coverage
run: poetry run coverage run manage.py test
- name: Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: poetry run coveralls
release:
name: Release
needs: [coverage]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Semantic Release
uses: relekang/python-semantic-release@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: __token__
repository_password: ${{ secrets.PYPI_TOKEN }}