Skip to content

Commit

Permalink
Merge pull request #46 from nilesh05apr/gh-test
Browse files Browse the repository at this point in the history
GitHub actions for unit test and code quality check.
  • Loading branch information
sudiptob2 authored Oct 13, 2022
2 parents 792a71a + 4b63d42 commit 4f1f538
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test
on:
pull_request:
types: [ready_for_review]

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macOS-latest]
python-version: [ '3.8', '3.9', '3.10' ]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Python version
run: python -c "import sys; print(sys.version)"

# Install pipenv
- name: Install pipenv
run: python3 -m pip install --upgrade pipenv

# create .venv folder
- name: create .venv folder
run: mkdir -p .venv

# caching dependencies
- name: Caching Dependencies
uses: actions/cache@v2
id: cache-dependencies
with:
path: .venv
key: ${{ matrix.os }}-python-${{ steps.setup-python.outputs.python-version }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}

# install dependencies
- name: Install dependencies
if: steps.cache-dependencies.outputs.cache-hit != 'true'
run: |
pipenv install --dev --verbose
pipenv install types-requests --dev
# Run bash script
- name: run Bash script
run: pipenv run bash ./.github/check.sh

0 comments on commit 4f1f538

Please sign in to comment.