Skip to content

Commit

Permalink
Use github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jaap3 committed Mar 7, 2024
1 parent 37085b4 commit fb5ebf3
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 30 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ end_of_line = lf

[*.py]
max_line_length = 119

[{*.yml,*.yaml}]
indent_size = 2
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
- push
- pull_request

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint
run: make lint

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
# Keep in sync with tox.ini
- '3.8'
- '3.10'
- '3.12'

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Test with tox
run: tox
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
envlist = py{38,310,312}-dj{32,42},py{312}-dj{main}

[testenv]
# Keep in sync with .github/workflows/ci.yml
basepython = py38: python3.8
py310: python3.10
py312: python3.12
Expand All @@ -13,3 +14,9 @@ deps = dj32: Django~=3.2.0
[testenv:flake8]
commands = flake8 djrichtextfield testproject
deps = flake8

[gh-actions]
python =
3.8: py38
3.10: py310
3.12: py312

0 comments on commit fb5ebf3

Please sign in to comment.