Skip to content

CKAN Coding Standards #5

CKAN Coding Standards

CKAN Coding Standards #5

Workflow file for this run

name: Check types
on: [pull_request]
env:
NODE_VERSION: '18'
PYTHON_VERSION: '3.9'
permissions:
contents: read
jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
id: gitcheckout
- uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install python deps
id: pydepends
if: steps.gitcheckout.outcome == 'success'
run: |
python3 -m venv /home/runner/work/app
mkdir -p /home/runner/work/app/src/ckanext-gcnotify
cp -R . /home/runner/work/app/src/ckanext-gcnotify
source /home/runner/work/app/bin/activate
pip install --upgrade setuptools==70.0.0
pip install --upgrade pip==23.2.1
pip install -e 'git+https://github.com/ckan/ckan@master#egg=ckan' -r 'https://raw.githubusercontent.com/ckan/ckan/master/requirements.txt' -r 'https://raw.githubusercontent.com/ckan/ckan/master/dev-requirements.txt'
pip install -e /home/runner/work/app/src/ckanext-gcnotify/. -r /home/runner/work/app/src/ckanext-gcnotify/requirements.txt -r /home/runner/work/app/src/ckanext-gcnotify/dev-requirements.txt
pip install --upgrade setuptools==44.1.0
find /home/runner/work/app -name '*.pyc' -delete
- name: Install node deps
if: steps.pydepends.outcome == 'success'
run: |
cd /home/runner/work/app/src/ckanext-gcnotify
npm ci
- name: Check types
if: steps.pydepends.outcome == 'success'
run: |
cd /home/runner/work/app/src/ckanext-gcnotify
npx pyright