Skip to content

Commit

Permalink
Add/Update : Github Workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
arunsureshkumar authored and arun-sureshkumar committed Mar 1, 2024
1 parent 7ef25ec commit 1f028a9
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 47 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/ci.yml

This file was deleted.

12 changes: 5 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ name: 🚀 Deploy to PyPI
on:
push:
tags:
- 'v*'
- '*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: 3.9
python-version: '3.10'
- name: Build wheel and source tarball
run: |
pip install wheel
Expand All @@ -24,5 +24,3 @@ jobs:
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
verbose: true

22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.10.5
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run lint 💅
run: |
black graphene_federation --check
mypy graphene_federation
45 changes: 45 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Unit Tests

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[test]"
- name: Run Unit Tests
run: py.test tests --cov=graphene_federation -vv
- name: Upload coverage
run: |
pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true

coveralls:
name: Indicate completion to coveralls.io
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip3 install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 1f028a9

Please sign in to comment.