Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a pr build and test action #1

Merged
merged 1 commit into from
Jan 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Reddit-Get Continuous Integration

on:
pull_request:
branches: [ main ]

workflow_dispatch:

jobs:
build_and_test_pr:
runs-on: ubuntu-latest
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
python-version:
- 3.6.x
- 3.7.x
- 3.8.x
- 3.9.x
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python Version
run: |
python --version
pip --version
- name: Update pip, setuptools, and wheel
run: pip install -U pip setuptools wheel
- name: Setup Poetry
uses: Gr1N/setup-poetry@v4
with:
poetry-preview: true
run: poetry --version
- name: Cache Dependencies
uses: actions/cache@v1
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Poetry Dependencies
run: |
poetry --version
poetry install -v --remove-untracked
poetry
- name: Run Pytest with Black, isort, and coverage
run: poetry run pytest --black --isort --cov=reddit_get --durations=3