Bump cookie, socket.io and express in /ui #119
This file contains 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: MMPM Build Pipeline | |
on: | |
push: | |
branches: | |
- "*" | |
tags: | |
- "*" | |
pull_request: | |
branches: | |
- "*" | |
release: | |
types: [created] | |
jobs: | |
mmpm-cli: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache Python Dependencies | |
uses: actions/cache@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
path: | | |
~/.cache/pip | |
${{ github.workspace }}/.venv | |
key: ${{ runner.os }}-python-deps-${{ hashFiles('**/pdm.lock') }} | |
restore-keys: | | |
${{ runner.os }}-python-deps-${{ hashFiles('**/pdm.lock') }} | |
- name: Python Dependencies | |
run: | | |
python -m pip install pdm | |
pdm install | |
- name: Python Tests | |
run: | | |
pdm run lint | |
pdm run mypy | |
pdm run test | |
pdm run report | |
- name: Python Build | |
run: | | |
pdm build | |
- name: Install Test | |
run: | | |
pdm install | |
${{ github.workspace }}/.venv/bin/mmpm version | |
${{ github.workspace }}/.venv/bin/mmpm --help | |
mmpm-ui: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ["16.x", "18.x", "20.x", "22"] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache Node Modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
'./ui/node_modules' | |
key: ${{ runner.os }}-angular-deps-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-angular-deps-${{ hashFiles('**/package-lock.json') }} | |
- name: Cache Angular Build Artifacts | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/ui/build | |
key: ${{ runner.os }}-angular-build-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-angular-build-${{ hashFiles('**/package-lock.json') }} | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Angular Dependencies | |
run: | | |
cd ui && npm install --legacy-peer-deps && cd .. | |
- name: Angular Tests | |
run: | | |
cd ui && npm run lint && cd .. | |
- name: Angular Build | |
run: | | |
cd ui && ./node_modules/@angular/cli/bin/ng.js build --configuration production --output-hashing none --base-href / && cd .. | |
create-artifact: | |
needs: [mmpm-cli, mmpm-ui] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Restore Python Dependencies Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/pip | |
${{ github.workspace }}/.venv | |
key: ${{ runner.os }}-python-deps-${{ hashFiles('**/pdm.lock') }} | |
restore-keys: | | |
${{ runner.os }}-python-deps-${{ hashFiles('**/pdm.lock') }} | |
- name: Restore Angular Build Artifacts Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/ui/build | |
key: ${{ runner.os }}-angular-build-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-angular-build-${{ hashFiles('**/package-lock.json') }} | |
- name: Package MMPM | |
run: | | |
python -m pip install pdm | |
pdm install | |
mkdir -p ${{ github.workspace }}/mmpm/ui | |
cp -r ${{ github.workspace }}/ui/build/* ${{ github.workspace }}/mmpm/ui | |
pdm build | |
- name: Cache MMPM Artifacts | |
uses: actions/cache@v3 | |
with: | |
path: | | |
${{ github.workspace }}/dist | |
key: ${{ runner.os }}-python-build-${{ hashFiles('**/pdm.lock') }} | |
restore-keys: | | |
${{ runner.os }}-python-build-${{ hashFiles('**/pdm.lock') }} | |
- name: Publish to PyPi | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |
skip_existing: true | |
verbose: true | |
- name: Publish Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: actions/upload-artifact@v3 | |
with: | |
name: python-package-distributions | |
path: ${{ github.workspace }}/dist/ |