Skip to content

Switch build to hatch, build wheel in CI #84

Switch build to hatch, build wheel in CI

Switch build to hatch, build wheel in CI #84

Workflow file for this run

name: CI
"on":
push:
branches:
- master
pull_request:
branches:
- master
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: pre-commit/action@v3.0.0
Python:
runs-on: ubuntu-latest
env:
DEBUG: "1"
strategy:
matrix:
include:
- python-version: "3.7"
- python-version: "3.11"
steps:
- uses: actions/checkout@v3
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
cache: pip
cache-dependency-path: |
pyproject.toml
setup.py
tox.ini
- run: pip install -U tox tox-gh-actions
- run: tox
- uses: codecov/codecov-action@v3
JavaScript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18.x
cache: yarn
cache-dependency-path: |
infotv/frontend/package.json
infotv/frontend/yarn.lock
- run: yarn --frozen-lockfile
working-directory: ./infotv/frontend
- run: yarn lint
working-directory: ./infotv/frontend
- run: yarn build
working-directory: ./infotv/frontend
- run: yarn test
working-directory: ./infotv/frontend
- uses: actions/upload-artifact@v3
with:
name: infotv-static
path: ./infotv/static
Build-Wheel:
needs:
- JavaScript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip
- uses: actions/download-artifact@v2
with:
name: infotv-static
path: infotv/static
- run: pip install build
- run: python -m build .
- run: zipinfo dist/*.whl | grep static/infotv/bundle.js || exit 42
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist