workflows #1
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: Check types | |
| on: [push, 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-datastore-search | |
| cp -R . /home/runner/work/app/src/ckanext-datastore-search | |
| 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-datastore-search/. -r /home/runner/work/app/src/ckanext-datastore-search/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-datastore-search | |
| npm ci | |
| - name: Check types | |
| if: steps.pydepends.outcome == 'success' | |
| run: | | |
| cd /home/runner/work/app/src/ckanext-datastore-search | |
| npx pyright |