diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..88b70488 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,38 @@ +name: Test + +on: + pull_request: + +env: + DJANGO_SETTINGS_MODULE: config.settings.test + USE_DOCKER: false + MUCKROCK_TOKEN: token + SECRET_KEY: ${{secrets.SECRET_KEY}} + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + cache: "pip" # caching pip dependencies + + - name: Install + run: | + pip install pip<24.1 + pip install -r requirements/local.txt + + - name: Pytest + run: pytest squarelet + + - name: Lint + run: pylint squarelet + + - name: Isort + run: isort --check-only -rc squarelet + + - name: Formatting + run: black --check squarelet --exclude migrations