Skip to content

Commit

Permalink
add static checks
Browse files Browse the repository at this point in the history
  • Loading branch information
wozniakpl committed Mar 6, 2024
1 parent 5f9dbfa commit d61c8f3
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 36 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
branches:
- gha

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Build
run: |
docker buildx create --use
docker buildx build \
-t ${{ secrets.DOCKERHUB_USERNAME }}/hope-core:${{ github.sha }}-dev \
-f ./docker/Dockerfile \
--target dev \
--load \
./
- name: Checks
run: |
docker run --rm -it ${{ secrets.DOCKERHUB_USERNAME }}/hope-core:${{ github.sha }}-dev sh -c "
./dev.sh sort
./dev.sh format
./dev.sh lint
./dev.sh mypy
"
36 changes: 0 additions & 36 deletions .github/workflows/main.yml

This file was deleted.

6 changes: 6 additions & 0 deletions backend/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ else
coverage combine
coverage xml
;;
"sort")
isort .
;;
"format")
black .
;;
"lint")
mkdir -p ./lint-results
flake8 --format=junit-xml . > ./lint-results/flake8.xml
Expand Down

0 comments on commit d61c8f3

Please sign in to comment.