Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Add basic CI setup #84

Closed
Closed
Show file tree
Hide file tree
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
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Run CI

on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pipenv
pipenv install --dev

- name: Black
run: python -m black --check src/

- name: Pylint
run: python -m pylint **/*.py
Comment on lines +25 to +29
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are in use on https://github.com/hackgvl/slack-events-bot. Do we want to enforce the same linting rules in this repository? I gave each a shot locally, and the diff would be quite large.

I think there would be a lot of value in having consistency across the org, though, so it may be worth it.


- name: Set Stage for Unit Tests
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would love to eliminate this step.

run: |
cp config.ini.example config.ini
cp logging_config.ini.example logging_config.ini
mkdir logs && touch logs/gunicorn.error.log

- name: Unit Tests
run: python test.py
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python 3.9.17
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this since asdf is being used on https://github.com/hackgvl/slack-events-bot

2 changes: 2 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ urllib3 ="<2"
python_version = "3.9"

[dev-packages]
black = "*"
plylint = "*"
Loading