From f580d5562f9f08f727d95d0553f6a1189ff6d239 Mon Sep 17 00:00:00 2001 From: Penny Date: Sun, 27 Oct 2024 20:15:22 +0900 Subject: [PATCH] add github actions --- .github/workflows/checks.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/workflows/checks.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..c3f8b2c --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,20 @@ +name: Checks + +on: [push] + +jobs: + test-lint: + name: Test and Lint + runs-on: ubuntu-20.04 + steps: + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USER }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Checkout + uses: actions/checkout@v2 + - name: Test + run: docker compose run --rm app sh -c "python manage.py test" + - name: Lint + run: docker compose run --rm app sh -c "flake8"