Skip to content

Upgrade foundry-js to 0.22.0, vitest to 4.1.8, fix CVEs #122

Upgrade foundry-js to 0.22.0, vitest to 4.1.8, fix CVEs

Upgrade foundry-js to 0.22.0, vitest to 4.1.8, fix CVEs #122

Workflow file for this run

name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
jobs:
test-python-function:
name: Test Python Function
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.13'
- name: Install Python dependencies
working-directory: functions/GreetingFunction
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Python function tests
working-directory: functions/GreetingFunction
run: |
python -m pytest test_function.py -v
- name: Test function startup
working-directory: functions/GreetingFunction
run: |
python -c "import main; print('Function imports successfully')"
- name: Validate manifest.yml
run: |
pip install pyyaml
python -c "import yaml; yaml.safe_load(open('manifest.yml'))"
echo "manifest.yml is valid YAML"
build-ui:
name: Build UI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node.js
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version: '22'
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
with:
version: 10
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
working-directory: ui/pages/foundryjs-demo
run: pnpm install --frozen-lockfile
- name: Run linter
working-directory: ui/pages/foundryjs-demo
run: pnpm run lint
- name: Run tests
working-directory: ui/pages/foundryjs-demo
run: pnpm test
- name: Build UI
working-directory: ui/pages/foundryjs-demo
run: pnpm run build