Skip to content

make ci requirements and extras group #91

make ci requirements and extras group

make ci requirements and extras group #91

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
render:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- run: python -m pip install cookiecutter
- run: python -m cookiecutter . --no-input
- uses: actions/upload-artifact@v3
with:
name: rendered-project
path: wagtail-llama-save
lint:
needs: render
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: actions/download-artifact@v3
# Restore the rendered artifact to a directory outside the repo checkout.
# Even if we invoke pre-commit from in a subdirectory
# it tries to lint the whole repo including the raw templates.
with:
name: rendered-project
path: /tmp/wagtail-llama-save
- name: Run Lint Checks
working-directory: /tmp/wagtail-llama-save
# In order to get pre-commit to see any files,
# we have to initialize a git repo
# and at least stage the files we want to check.
# Otherwise pre-commit will stash everything and
# tell us there are no files to check.
# refs
# https://github.com/wagtail/cookiecutter-wagtail-package/pull/45#discussion_r1064195179
# https://github.com/pre-commit/pre-commit/issues/848
run: |
git init
git add .
python -m pip install pre-commit
pre-commit run --all-files --show-diff-on-failure --color=always
install-package:
needs: render
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: actions/download-artifact@v3
with:
name: rendered-project
path: wagtail-llama-save
- name: Ensure package can be installed
working-directory: wagtail-llama-save
run: python -m pip install -e .
build-js:
needs: render
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/download-artifact@v3
with:
name: rendered-project
path: wagtail-llama-save
- name: Build JS
working-directory: wagtail-llama-save
run: |
npm install --omit=optional --no-audit --progress=false
npm run build