Skip to content

Commit

Permalink
Migrate from make to just
Browse files Browse the repository at this point in the history
  • Loading branch information
relud committed Nov 14, 2024
1 parent 9b92f64 commit 661c814
Show file tree
Hide file tree
Showing 16 changed files with 212 additions and 280 deletions.
8 changes: 0 additions & 8 deletions .env

This file was deleted.

16 changes: 10 additions & 6 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ jobs:
contents: read
deployments: write
id-token: write
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
# Disable docker compose volume mounts in docker-compose.override.yml
COMPOSE_FILE: docker-compose.yml
steps:
- uses: actions/checkout@v4
- name: Get info
Expand All @@ -36,20 +39,21 @@ jobs:
"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID" > version.json
- name: Output version.json
run: cat version.json
- name: Install just
run: sudo apt-get update && sudo apt-get install -y just
- name: Build Docker images
run: |
make build
just build
docker compose images
- name: Verify requirements.txt contains correct dependencies
run: |
docker run --rm local/socorro_app shell ./bin/verify_reqs.sh
just verify-reqs
- name: Run lint check
run: |
docker run --rm local/socorro_app shell ./bin/lint.sh
just lint
- name: Run tests
run: |
make my.env
docker compose run --rm test-ci shell ./bin/test.sh
just test
- name: Set Docker image tag to "latest" for updates of the main branch
if: github.ref == 'refs/heads/main'
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ symbols/
.docker-build*
.devcontainer-build
.cache/
docker-compose.override.yml
my.env
.env

# docs things
docs/_build/
158 changes: 0 additions & 158 deletions Makefile

This file was deleted.

11 changes: 9 additions & 2 deletions bin/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,18 @@ FILES="socorro-cmd docker socorro webapp bin"
PYTHON_VERSION=$(python --version)


if [[ "${1:-}" == "--fix" ]]; then
if [[ "${1:-}" == "--help" ]]; then
echo "Usage: $0 [OPTIONS]"
echo
echo " Lint code"
echo
echo "Options:"
echo " --help Show this message and exit."
echo " --fix Reformat code."
elif [[ "${1:-}" == "--fix" ]]; then
echo ">>> ruff fix (${PYTHON_VERSION})"
ruff format $FILES
ruff check --fix $FILES

else
echo ">>> ruff (${PYTHON_VERSION})"
ruff check $FILES
Expand Down
37 changes: 37 additions & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
# define volumes in docker-compose.override.yml so that can be ignored in CI
services:
app:
volumes:
- .:/app
test:
volumes:
- .:/app

processor:
volumes:
- .:/app

crontabber:
volumes:
- .:/app

webapp:
volumes:
- .:/app

stage_submitter:
volumes:
- .:/app

collector:
volumes:
- .:/socorro

fakecollector:
volumes:
- .:/app

symbolsserver:
volumes:
- .:/app
Loading

0 comments on commit 661c814

Please sign in to comment.