Skip to content

Commit

Permalink
Add build step to PR CI/CD (#105)
Browse files Browse the repository at this point in the history
* Add build step to PR CI/CD

* Use pre-commit action

* Add an env step
  • Loading branch information
AetherUnbound authored Apr 9, 2023
1 parent 29246af commit 01754e9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
6 changes: 5 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 01754e9

Please sign in to comment.