Skip to content

Move Pydantic lax mode into its own file #3169

Move Pydantic lax mode into its own file

Move Pydantic lax mode into its own file #3169

# Simple workflow for Building and Testing the Pyrefly Website
# If upload_artifacts is true, the build artifacts will be uploadeded.
name: Build and Test Pyrefly Website
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow this workflow to be called by other workflows
workflow_call:
inputs:
upload_artifacts:
description: 'Whether to upload artifacts after build'
required: false
default: false
type: boolean
push:
branches: [ main ]
pull_request:
types: [opened]
paths:
- 'website/**'
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js version
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Install yarn deps
run: cd website && yarn install
- name: Install wasm-pack
run: cargo install wasm-pack wasm-opt
- name: Use rust nightly
run: rustup install nightly && rustup default nightly
- name: Build
working-directory: ./website
run: cargo version && chmod +x scripts/build.sh && scripts/build.sh && yarn build-wasm-for-test
- name: Typecheck
working-directory: ./website
run: yarn tsc --noEmit
- name: Test
working-directory: ./website
run: yarn test
- name: Get current date
id: date
if: ${{ inputs.upload_artifacts }}
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Upload build artifacts
if: ${{ inputs.upload_artifacts }}
uses: actions/upload-artifact@v4
with:
name: website-build-${{ env.date }}
path: website/build
retention-days: 30