Skip to content

CKAN Coding Standards #3

CKAN Coding Standards

CKAN Coding Standards #3

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/open-data/[email protected]#egg=ckan' -r 'https://raw.githubusercontent.com/open-data/ckan/canada-v2.10/requirement-setuptools.txt' -r 'https://raw.githubusercontent.com/open-data/ckan/canada-v2.10/requirements.txt' -r 'https://raw.githubusercontent.com/open-data/ckan/canada-v2.10/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
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