Skip to content

Commit

Permalink
add quality checks
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos committed Jun 25, 2024
1 parent 22bc4dd commit e760ae7
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

- package-ecosystem: "pip"
directory: "backend/" # Location of package manifests
schedule:
interval: "weekly"
ignore:
- dependency-name: "django"
update-types: [ "version-update:semver-major", "version-update:semver-minor" ] # only allow auto update on django bug and security fixes

- package-ecosystem: "npm"
directory: "front-end/" # Location of package manifests
schedule:
interval: "weekly"
109 changes: 109 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Quality checks

on:
pull_request:
push:
branches:
- master
- main
- next

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

env:
DEBIAN_FRONTEND: noninteractive

jobs:
flake8:
name: Python Flake8 check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: 'pip'
cache-key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }}

- name: Install flake8
run: |
pip install flake8 -c dev-requirements.txt
- name: Flake8
run: |
flake8 project
isort:
name: Python iSort check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: 'pip'
cache-key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }}

- name: Install isort
run: |
pip install isort -c dev-requirements.txt
- name: iSort
run: |
isort -c project
black:
name: Python Black check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: 'pip'
cache-key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt', 'dev-requirements.txt') }}

- name: Install black
run: |
pip install black -c dev-requirements.txt
- name: black
run: |
black --check project
prettier:
name: JS Prettier check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ./front-end/.nvmrc
cache: 'npm'
cache-dependency-path: ./front-end/.nvmrc

- name: Install node dependencies
run: |
npm ci
- name: Type check
run: |
npm run format:check
type:
name: JS Type check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ./front-end/.nvmrc
cache: 'npm'
cache-dependency-path: ./front-end/.nvmrc

- name: Install node dependencies
run: |
npm ci
- name: Type check
run: |
npm run type:check

0 comments on commit e760ae7

Please sign in to comment.