-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 963671c
Showing
73 changed files
with
10,825 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "RD-WATCH", | ||
"dockerComposeFile": "../docker-compose.yaml", | ||
"service": "vscode", | ||
"runServices": [ | ||
"django", | ||
"postgresql", | ||
"rdwatch", | ||
"redis", | ||
"unit-reloader", | ||
"vue" | ||
], | ||
"workspaceFolder": "/app", | ||
"customizations": { | ||
"vscode": { | ||
"settings": {}, | ||
"extensions": [ | ||
"bradlc.vscode-tailwindcss", | ||
"bungcip.better-toml", | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode", | ||
"ms-python.python", | ||
"stylelint.vscode-stylelint", | ||
"Vue.volar" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
**/__pycache__ | ||
**/.DS_Store | ||
**/.env | ||
**/.git | ||
**/.idea | ||
**/.mypy_cache | ||
**/.venv | ||
**/.vscode | ||
**/*.local | ||
**/*.log | ||
**/*.njsproj | ||
**/*.ntvs* | ||
**/*.sln | ||
**/*.suo | ||
**/*.sw? | ||
**/dist | ||
**/dist-ssr | ||
**/docker-compose.override.yml | ||
**/lerna-debug.log* | ||
**/logs | ||
**/node_modules | ||
**/npm-debug.log* | ||
**/pnpm-debug.log* | ||
**/venv | ||
**/yarn-debug.log* | ||
**/yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.py] | ||
indent_size = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: CD | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
push: | ||
branches: | ||
- "phase-ii" | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
include: | ||
- image-name: rdwatch | ||
context: "." | ||
target: | ||
- image-name: builder | ||
context: "." | ||
target: builder | ||
- image-name: postgresql | ||
context: docker/services/postgresql | ||
target: | ||
- image-name: redis | ||
context: docker/services/redis | ||
target: | ||
- image-name: unit-reloader | ||
context: docker/services/debug/unit-reloader | ||
target: | ||
name: Build [${{ matrix.image-name }}] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to GHCR | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Sanitize repo slug | ||
uses: actions/github-script@v6 | ||
id: repo-slug | ||
with: | ||
result-encoding: string | ||
script: return 'ghcr.io/${{ github.repository }}'.toLowerCase() | ||
- name: Build and push Docker image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
cache-from: type=registry,ref=${{ steps.repo-slug.outputs.result }}/${{ matrix.image-name }}:latest | ||
cache-to: type=inline | ||
context: ${{ matrix.context }} | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{ steps.repo-slug.outputs.result }}/${{ matrix.image-name }}:latest | ||
target: ${{ matrix.target }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
types: [opened, synchronize] | ||
push: | ||
branches: | ||
- "phase-ii" | ||
env: | ||
# using a dummy secret key | ||
DJANGO_SETTINGS_MODULE: rdwatch.server.settings | ||
RDWATCH_SECRET_KEY: ff07f533a59fed1349a4fc49941d02ff22514f6dbf6086a44ea0c0a8952e8644 | ||
RDWATCH_POSTGRESQL_URI: postgresql://rdwatch:ff07f533a59fed1349a4fc49941d02ff22514f6dbf6086a44ea0c0a8952e8644@localhost:5432/rdwatch | ||
RDWATCH_REDIS_URI: redis://rdwatch:ff07f533a59fed1349a4fc49941d02ff22514f6dbf6086a44ea0c0a8952e8644@localhost:6379/rdwatch | ||
RDWATCH_DJANGO_DEBUG: 0 | ||
jobs: | ||
lint-python: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
linter: [black, isort, mypy, prospector] | ||
name: Lint [${{ matrix.linter }}] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Install system dependencies | ||
run: apt-fast install --no-install-recommends --yes | ||
libgdal30 | ||
libproj22 | ||
python3-cachecontrol | ||
python3-dev | ||
python3-poetry | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "poetry" | ||
cache-dependency-path: "django/poetry.lock" | ||
- name: Install packages | ||
run: poetry install | ||
working-directory: django | ||
- name: Run ${{ matrix.linter }} | ||
run: poetry run task lint:${{ matrix.linter }} | ||
working-directory: django | ||
lint-node: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
linter: [prettier, eslint, stylelint, typescript] | ||
name: Lint [${{ matrix.linter }}] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Node environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: npm | ||
cache-dependency-path: vue/package-lock.json | ||
- name: Install packages | ||
run: npm ci | ||
working-directory: vue | ||
- name: Run ${{ matrix.linter }} | ||
run: npm run lint:${{ matrix.linter }} | ||
working-directory: vue | ||
test-django: | ||
name: Test [django] | ||
runs-on: ubuntu-22.04 | ||
services: | ||
postgres: | ||
image: ghcr.io/resonantgeodata/rd-watch/postgresql:latest | ||
env: | ||
POSTGRES_PASSWORD: ${{ env.RDWATCH_SECRET_KEY }} | ||
redis: | ||
image: ghcr.io/resonantgeodata/rd-watch/redis:latest | ||
env: | ||
RDWATCH_SECRET_KEY: ${{ env.RDWATCH_SECRET_KEY }} | ||
steps: | ||
- name: Install system dependencies | ||
run: apt-fast install --no-install-recommends --yes | ||
libgdal30 | ||
libproj22 | ||
python3-cachecontrol | ||
python3-dev | ||
python3-poetry | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "poetry" | ||
cache-dependency-path: "django/poetry.lock" | ||
- name: Install packages | ||
run: poetry install | ||
working-directory: django | ||
- name: Run tests | ||
run: poetry run django-admin test | ||
working-directory: django | ||
test-django-makemigrations: | ||
name: Test [django makemigrations] | ||
runs-on: ubuntu-22.04 | ||
services: | ||
postgres: | ||
image: ghcr.io/resonantgeodata/rd-watch/postgresql:latest | ||
env: | ||
POSTGRES_PASSWORD: ${{ env.RDWATCH_SECRET_KEY }} | ||
redis: | ||
image: ghcr.io/resonantgeodata/rd-watch/redis:latest | ||
env: | ||
RDWATCH_SECRET_KEY: ${{ env.RDWATCH_SECRET_KEY }} | ||
steps: | ||
- name: Install system dependencies | ||
run: apt-fast install --no-install-recommends --yes | ||
libgdal30 | ||
libproj22 | ||
python3-cachecontrol | ||
python3-dev | ||
python3-poetry | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Python environment | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
cache: "poetry" | ||
cache-dependency-path: "django/poetry.lock" | ||
- name: Install packages | ||
run: poetry install | ||
working-directory: django | ||
- name: Check for up-to-date migrations | ||
run: poetry run django-admin makemigrations --dry-run --check | ||
working-directory: django | ||
test-vue: | ||
name: Test [vue] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Setup Node environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
cache: npm | ||
cache-dependency-path: vue/package-lock.json | ||
- name: Install packages | ||
run: npm ci | ||
working-directory: vue | ||
- name: Run tests | ||
run: npm run test | ||
working-directory: vue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
.env | ||
|
||
# overrides for developers | ||
requirements.dev.txt | ||
docker-compose.override.yml | ||
docker-compose.override.yaml | ||
.vscode | ||
|
||
# system files | ||
.DS_Store | ||
.DS_Store? | ||
._* | ||
.Spotlight-V100 | ||
.Trashes | ||
ehthumbs.db | ||
Thumbs.db | ||
|
||
# node files/folders | ||
node_modules | ||
dist | ||
|
||
# python files/folders | ||
__pycache__ | ||
.dmypy.json | ||
.mypy_cache | ||
.venv | ||
*.pyc | ||
dmypy.json |
Oops, something went wrong.