File Manager [WIP] CloudTAK @ 11 #5901
This file contains hidden or 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
name: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
- ready_for_review | |
permissions: | |
contents: read | |
jobs: | |
events: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{github.event.pull_request.head.sha || github.sha}} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install | |
working-directory: ./tasks/events/ | |
run: npm install | |
- name: Lint | |
working-directory: ./tasks/events/ | |
run: npm run lint | |
- name: Check | |
working-directory: ./tasks/events/ | |
run: npm run check | |
pmtiles: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{github.event.pull_request.head.sha || github.sha}} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install | |
working-directory: ./tasks/pmtiles/ | |
run: npm install | |
- name: Lint | |
working-directory: ./tasks/pmtiles/ | |
run: npm run lint | |
- name: Check | |
working-directory: ./tasks/pmtiles/ | |
run: npm run check | |
- name: Build | |
working-directory: ./tasks/pmtiles/ | |
run: npm run build | |
test: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{github.event.pull_request.head.sha || github.sha}} | |
- name: Docker Compose Build | |
run: docker compose up --build -d postgis | |
- name: Docker API Build | |
run: docker compose build api | |
- name: Docker API Lint | |
run: docker run cloudtak-api:latest sh -c "npm install --include=dev && npm run lint" | |
- name: Docker Test & Coverage | |
run: docker run --network cloudtak_default -v ./coverage/:/home/etl/api/coverage -e "POSTGRES=postgres://docker:docker@postgis:5432/gis" cloudtak-api:latest npm run coverage | |
- name: Docker Folder Permissions | |
run: docker run --network cloudtak_default -v ./coverage/:/home/etl/api/coverage -e "POSTGRES=postgres://docker:docker@postgis:5432/gis" cloudtak-api:latest chmod -R 777 /home/etl/api/coverage | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v5 | |
env: | |
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}} | |
with: | |
files: ./coverage/lcov.info | |
- name: Docker Cleanup | |
run: docker compose kill | |
web: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{github.event.pull_request.head.sha || github.sha}} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
registry-url: https://registry.npmjs.org/ | |
- name: Install | |
working-directory: ./api/web/ | |
run: npm install | |
- name: Lint | |
working-directory: ./api/web/ | |
run: npm run lint | |
- name: Check | |
working-directory: ./api/web/ | |
run: npm run check | |
- name: Test | |
working-directory: ./api/web/ | |
run: npm run test:run |