Add eslint and typescript checking 2 #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
name: Update Test Coverage Artifact | |
on: | |
workflow_dispatch: | |
inputs: | |
isManual: | |
description: 'Manual Run?' | |
required: true | |
default: true | |
type: boolean | |
pull_request: | |
types: | |
- closed | |
jobs: | |
update-test-coverage-artifact: | |
# if: github.event.pull_request.merged == true || ${{ inputs.isManual }} == true | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgis/postgis:13-3.0 | |
env: | |
POSTGRES_PASSWORD: postgis | |
POSTGRES_DB: ${{ github.event.repository.name }} | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.12"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: geekyeggo/delete-artifact@v5 | |
with: | |
name: ${{ github.event.pull_request.base.ref }}-coverage-report | |
failOnError: false | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
check-latest: true | |
- name: Install Java, GDAL, and other system dependencies | |
run: | | |
sudo apt update | |
sudo apt-get install libxml2-dev libpq-dev openjdk-8-jdk libgdal-dev libxslt-dev | |
echo Postgres and ES dependencies installed | |
- name: Install python packages | |
run: | | |
python -m pip install --upgrade pip | |
pip install . | |
pip install -r ${{ github.event.repository.name }}/install/requirements.txt | |
pip install -r ${{ github.event.repository.name }}/install/requirements_dev.txt | |
echo Python packages installed | |
- uses: ankane/setup-elasticsearch@v1 | |
with: | |
elasticsearch-version: 8 | |
# - name: Webpack frontend files | |
# run: | | |
# echo "Removing yarn.lock due to yarn v1 package resolution issues" | |
# echo "https://github.com/iarna/wide-align/issues/63" | |
# rm yarn.lock | |
# yarn && yarn build_test | |
- name: Check for missing migrations | |
run: | | |
python manage.py makemigrations --check | |
- name: Run unit tests | |
run: | | |
python -W default::DeprecationWarning -m coverage run manage.py test tests --settings="tests.test_settings" | |
- name: Generate report coverage | |
run: | | |
coverage json | |
- name: Upload coverage report as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.pull_request.base.ref }}-coverage-report | |
path: coverage.json |