diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 40aa9f2..b67c750 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -12,10 +12,8 @@ jobs: - uses: actions/setup-python@v4 with: python-version: 3.11 - - name: Install Dependencies - run: pip install pre-commit - name: Run static checks - run: pre-commit run --all-files + uses: pre-commit/action@v3.0.0 test: runs-on: ubuntu-latest @@ -31,3 +29,13 @@ jobs: run: pip install pytest pytest-cov - name: Test with pytest run: pytest --cov . + + build: + runs-on: ubuntu-latest + needs: + - static-checks + steps: + - uses: actions/checkout@v3 + - uses: extractions/setup-just@v1 + - name: Build image + run: just build diff --git a/justfile b/justfile index f1c433d..fa72391 100644 --- a/justfile +++ b/justfile @@ -14,8 +14,12 @@ set positional-arguments default: @just --list --unsorted +# Create a .env file if it doesn't exist +env: + @([ ! -f .env ] && touch .env) || true + # Build the containers -build: +build: env {{ DC }} build # Spin up all (or one) service