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

Kipubot v2 #35

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
**

# Except for dependencies and source code
!Pipfile
!Pipfile.lock
!pyproject.toml
!poetry.lock
!kipubot
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
PYTHONPATH=${PYTHONPATH}:kipubot

BOT_TOKEN=
DATABASE_URL=
31 changes: 15 additions & 16 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,41 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Install pipenv
- name: Install poetry
run: |
python3 -m pip install --upgrade pip
pip install pipenv
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install poetry

- name: Install dependencies
run: |
pipenv install --dev
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "poetry"

- name: Set PYTHONPATH
- name: Install dependencies
run: |
echo "PYTHONPATH=${PYTHONPATH}:kipubot" >> $GITHUB_ENV
poetry install

- name: Lint with pylint
run: |
pipenv run lint
poetry run poe lint

- name: Set testing BOT_TOKEN
run: |
echo "BOT_TOKEN=${{secrets.TEST_BOT_TOKEN}}" >> $GITHUB_ENV

- name: Type-check with pytype
run: |
pipenv run pytype
poetry run poe type
env:
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres"

- name: Run unit tests
run: |
pipenv run pytest
poetry run poe test
env:
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres"
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
needs: [lint]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: akhileshns/heroku-deploy@v3.12.12
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ env/
.env
data/
.pytype/
.pytest_cache/
.pytest_cache/
__pycache__/
.vscode