Skip to content

Commit

Permalink
Simplify GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
David Sanders committed Aug 1, 2023
1 parent da95680 commit 74e86e9
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 37 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/lint.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,43 @@
name: Tests
name: "Lint & Test"

on: push

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Determine Python version
run: echo "PYTHON_VERSION=$(cat .python-version)" >> $GITHUB_ENV

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Setup virtualenv
run: |
python3 -m venv ./.venv
source .venv/bin/activate
- name: Install dependencies
run: pip install -Ur ./requirements.txt

- name: Black
run: black --check .

- name: isort
run: isort --check .

- name: flake8
run: flake8 --exclude .venv

Tests:
runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# stupid-django-tricks

![Tests](https://github.com/shangxiao/stupid-django-tricks/actions/workflows/tests.yml/badge.svg)
![Tests](https://github.com/shangxiao/stupid-django-tricks/actions/workflows/lint_and_tests.yml/badge.svg)


Various tricks with Django - some silly, some quite useful.
Expand Down

0 comments on commit 74e86e9

Please sign in to comment.