Skip to content

PyDebFlow v0.1.0 - Initial Release (Python + npm) #1

PyDebFlow v0.1.0 - Initial Release (Python + npm)

PyDebFlow v0.1.0 - Initial Release (Python + npm) #1

Workflow file for this run

name: Publish to npm
on:
release:
types: [published]
workflow_dispatch:
jobs:
# =========================================================================
# Job 1: Run Python tests (PyDebFlow must work)
# =========================================================================
test-python:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
- name: Run Python tests
run: python -m pytest tests/ -v --tb=short
# =========================================================================
# Job 2: Run npm tests
# =========================================================================
test-npm:
needs: test-python
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
node-version: ['18', '20']
steps:
- uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install npm dependencies
working-directory: npm
run: npm ci
- name: Build TypeScript
working-directory: npm
run: npm run build
- name: Run npm tests
working-directory: npm
run: npm test
# =========================================================================
# Job 3: Publish to npm
# =========================================================================
publish:
needs: test-npm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
working-directory: npm
run: npm ci
- name: Build
working-directory: npm
run: npm run build
- name: Publish to npm
working-directory: npm
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}