Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from make to just #6803

Merged
merged 2 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
relud marked this conversation as resolved.
Show resolved Hide resolved
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