updated readme #162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests, and lint with a single version of Python | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | |
name: Python application | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
RAPID_API_KEY: ${{ secrets.RAPID_API_KEY }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 pytest pylint black isort | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
# Check Black formatting | |
- name: Check Black formatting | |
run: | | |
black . | |
black --check . | |
# Sort imports with isort | |
- name: Sort imports with isort | |
run: | | |
isort jobhunter/*.py | |
# # Test with pytest | |
- name: Test with pytest | |
run: | | |
export PYTHONPATH=. && cd tests && pytest . | |