Last active
April 9, 2022 22:45
-
-
Save SaidBySolo/bcfe45bc0c2e37990217ea53520d825e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Simple Github action snippet | |
# Author: Ryu juheon(SaidBySolo) | |
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
style: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install -U pip | |
pip install -r requirements.txt | |
- name: Checking style | |
run: | | |
black ./your_file_or_module --check | |
isort ./your_file_or_module --profile=black | |
type: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install Dependencies | |
run: | | |
python -m pip install -U pip | |
pip install mypy | |
pip install -r requirements.txt | |
- name: Mypy cheking | |
run: mypy ./your_file_or_module --strict | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install -U pip | |
pip install -r requirements.txt | |
pip install pytest pytest-cov | |
- name: Run tests | |
run: | | |
pytest --cov=your_file_or_module --cov-report=xml | |
- name: Codecov | |
uses: codecov/codecov-action@v1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment