Skip to content

Start threading Structured signature into existing datastructures. #160

Start threading Structured signature into existing datastructures.

Start threading Structured signature into existing datastructures. #160

Workflow file for this run

name: Preview
on:
pull_request_target:
branches: [ main ]
permissions:
contents: read
statuses: write
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
jobs:
vercel:
runs-on: ubuntu-latest
environment: vercel-deployment
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install scipy numpy
flit install --symlink
git clone https://github.com/stsewd/tree-sitter-rst
cd tree-sitter-rst
git checkout 3fc88d2097bc854ab6bf70c52b3c482849cf8e8f
cd -
papyri build-parser
- name: Gen numpy
run: |
papyri gen examples/numpy.toml --no-exec --no-infer --no-narrative
sleep 1 # time for coverage to write its stuff
- name: Gen Scipy
run: |
papyri gen examples/scipy.toml --no-exec --no-infer
sleep 1 # time for coverage to write its stuff
- name: Self gen
run: |
papyri gen examples/papyri.toml --exec --no-narrative
sleep 1 # time for coverage to write its stuff
- name: Ingest and Render
run: |
papyri ingest --no-relink ~/.papyri/data/papyri_0.0.8
papyri ingest --no-relink ~/.papyri/data/*
papyri relink
papyri render
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Unique Deploy ID
id: deploy
run: |
echo "DEPLOY_ID=${{ github.event.pull_request.head.sha }}--${{ github.run_id }}" >> "$GITHUB_OUTPUT"
- name: Deploy Project Artifacts to Vercel
id: vercel
working-directory: "/home/runner/.papyri/html"
run: |
vercel --version
vercel pull --yes --environment=preview --token=$VERCEL_TOKEN
vercel build --token=$VERCEL_TOKEN
vercel deploy --prebuilt --archive=tgz --token=$VERCEL_TOKEN --meta commit=${{ steps.deploy.outputs.DEPLOY_ID }}
vercel ls --token=$VERCEL_TOKEN --meta commit=${{ steps.deploy.outputs.DEPLOY_ID }} &> vercel-output
url=$(cat vercel-output | grep http | awk '{print $2}')
echo "VERCEL_URL=$url" >> "$GITHUB_OUTPUT"
- name: Update PR status with Deployment URL
uses: Sibz/github-status-action@v1
with:
authToken: ${{ github.token }}
context: 'Vercel Deployment Preview'
description: 'Deployed'
state: 'success'
target_url: ${{ steps.vercel.outputs.VERCEL_URL }}
sha: ${{ github.event.pull_request.head.sha || github.sha }}