Add yamlfmt precommit hook (#2584)
Co-authored-by: Shuchang Zheng <wintonzheng0325@gmail.com>
This commit is contained in:
9
.github/workflows/build-docker-image.yml
vendored
9
.github/workflows/build-docker-image.yml
vendored
@@ -1,42 +1,34 @@
|
||||
name: Build Docker Image and Push to ECR
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
AWS_REGION: us-east-1
|
||||
ECR_BACKEND_REPOSITORY: skyvern
|
||||
ECR_UI_REPOSITORY: skyvern-ui
|
||||
REGISTRY_ALIAS: skyvern # t6d4b5t4
|
||||
|
||||
jobs:
|
||||
run-ci:
|
||||
uses: ./.github/workflows/ci.yml
|
||||
|
||||
build-docker-image:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [run-ci]
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Configure AWS credentials
|
||||
uses: aws-actions/configure-aws-credentials@v4
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
aws-region: ${{ env.AWS_REGION }}
|
||||
|
||||
- name: Login to Amazon ECR Public
|
||||
id: login-ecr-public
|
||||
uses: aws-actions/amazon-ecr-login@v2
|
||||
with:
|
||||
registry-type: public
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Build, tag, and push backend image to Amazon Public ECR
|
||||
id: build-image
|
||||
uses: docker/build-push-action@v2
|
||||
@@ -52,7 +44,6 @@ jobs:
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_BACKEND_REPOSITORY }}:${{ github.sha }}
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_BACKEND_REPOSITORY }}:${{ github.event.release.tag_name }}
|
||||
${{ env.ECR_REGISTRY}}/${{ env.REGISTRY_ALIAS }}/${{ env.ECR_BACKEND_REPOSITORY }}:latest
|
||||
|
||||
- name: Build, tag, and push ui image to Amazon Public ECR
|
||||
id: build-ui-image
|
||||
uses: docker/build-push-action@v2
|
||||
|
||||
22
.github/workflows/ci.yml
vendored
22
.github/workflows/ci.yml
vendored
@@ -1,5 +1,4 @@
|
||||
name: Run tests and pre-commit
|
||||
|
||||
# Run this job on pushes to `main`, and for pull requests. If you don't specify
|
||||
# `branches: [main], then this actions runs _twice_ on pull requests, which is
|
||||
# annoying.
|
||||
@@ -8,12 +7,10 @@ on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run tests and pre-commit hooks
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Service containers to run with `container-job`
|
||||
services:
|
||||
# Label used to access the service container
|
||||
@@ -27,23 +24,17 @@ jobs:
|
||||
POSTGRES_HOST_AUTH_METHOD: trust
|
||||
# Set health checks to wait until postgres has started
|
||||
options: >-
|
||||
--health-cmd pg_isready
|
||||
--health-interval 10s
|
||||
--health-timeout 5s
|
||||
--health-retries 5
|
||||
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
ports:
|
||||
# Maps tcp port 5432 on service container to the host
|
||||
- 5432:5432
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
# If you wanted to use multiple Python versions, you'd have specify a matrix in the job and
|
||||
# reference the matrixe python version here.
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
# Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow
|
||||
# from installing Poetry every time, which can be slow. Note the use of the Poetry version
|
||||
# number in the cache key, and the "-0" suffix: this allows you to invalidate the cache
|
||||
@@ -54,7 +45,6 @@ jobs:
|
||||
with:
|
||||
path: ~/.local
|
||||
key: poetry-1.7.1
|
||||
|
||||
# Install Poetry. You could do this manually, or there are several actions that do this.
|
||||
# `snok/install-poetry` seems to be minimal yet complete, and really just calls out to
|
||||
# Poetry's default install script, which feels correct. I pin the Poetry version here
|
||||
@@ -69,7 +59,6 @@ jobs:
|
||||
version: 1.7.1
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
|
||||
# Cache your dependencies (i.e. all the stuff in your `pyproject.toml`). Note the cache
|
||||
# key: if you're using multiple Python versions, or multiple OSes, you'd need to include
|
||||
# them in the cache key. I'm not, so it can be simple and just depend on the poetry.lock.
|
||||
@@ -79,19 +68,16 @@ jobs:
|
||||
with:
|
||||
path: .venv
|
||||
key: pydeps-${{ hashFiles('**/poetry.lock') }}
|
||||
|
||||
# Install dependencies. `--no-root` means "install all dependencies but not the project
|
||||
# itself", which is what you want to avoid caching _your_ code. The `if` statement
|
||||
# ensures this only runs on a cache miss.
|
||||
- run: poetry install --no-interaction --no-root
|
||||
if: steps.cache-deps.outputs.cache-hit != 'true'
|
||||
|
||||
# Now install _your_ project. This isn't necessary for many types of projects -- particularly
|
||||
# things like Django apps don't need this. But it's a good idea since it fully-exercises the
|
||||
# pyproject.toml and makes that if you add things like console-scripts at some point that
|
||||
# they'll be installed and working.
|
||||
- run: poetry install --no-interaction
|
||||
|
||||
# Finally, run pre-commit.
|
||||
- name: Run all pre-commit hooks
|
||||
uses: pre-commit/action@v3.0.0
|
||||
@@ -105,7 +91,6 @@ jobs:
|
||||
AZURE_GPT4O_MINI_API_VERSION: "dummy"
|
||||
AWS_REGION: "us-east-1"
|
||||
ENABLE_BEDROCK: "true"
|
||||
|
||||
- name: Run alembic check
|
||||
env:
|
||||
ENABLE_OPENAI: "true"
|
||||
@@ -123,7 +108,6 @@ jobs:
|
||||
ENABLE_OPENAI: "true"
|
||||
OPENAI_API_KEY: "sk-dummy"
|
||||
run: poetry run pytest tests
|
||||
|
||||
fe-lint-build:
|
||||
name: Frontend Lint and Build
|
||||
runs-on: ubuntu-latest
|
||||
@@ -133,17 +117,13 @@ jobs:
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Install Node.js dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run linter
|
||||
run: npm run lint
|
||||
|
||||
- name: Run build
|
||||
run: npm run build
|
||||
|
||||
6
.github/workflows/codeflash.yaml
vendored
6
.github/workflows/codeflash.yaml
vendored
@@ -1,17 +1,14 @@
|
||||
name: Codeflash
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
# So that this workflow only runs when code within the target module is modified
|
||||
- "skyvern/**"
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
# Any new push to the PR will cancel the previous run, so that only the latest code is optimized
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
optimize:
|
||||
name: Optimize new Python code in this PR
|
||||
@@ -21,7 +18,6 @@ jobs:
|
||||
env:
|
||||
CODEFLASH_API_KEY: ${{ secrets.CODEFLASH_API_KEY }}
|
||||
CODEFLASH_PR_NUMBER: ${{ github.event.number }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -44,5 +40,5 @@ jobs:
|
||||
poetry env use python
|
||||
poetry run codeflash
|
||||
- name: remove test dir
|
||||
run: |
|
||||
run: |-
|
||||
rm -rf codeflash-tests
|
||||
@@ -1,8 +1,6 @@
|
||||
name: Close inactive issues
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
jobs:
|
||||
close-issues:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
7
.github/workflows/n8n-ci.yml
vendored
7
.github/workflows/n8n-ci.yml
vendored
@@ -1,5 +1,4 @@
|
||||
name: Run n8n package CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
@@ -9,29 +8,23 @@ on:
|
||||
branches: [main]
|
||||
paths:
|
||||
- 'integrations/n8n/**'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v2
|
||||
with:
|
||||
version: 9
|
||||
run_install: false
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: integrations/n8n
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build and Lint
|
||||
working-directory: integrations/n8n
|
||||
run: pnpm prepublishOnly
|
||||
|
||||
4
.github/workflows/publish-fern-docs.yml
vendored
4
.github/workflows/publish-fern-docs.yml
vendored
@@ -1,10 +1,8 @@
|
||||
name: Publish Fern Docs
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -12,10 +10,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Fern
|
||||
run: npm install -g fern-api
|
||||
|
||||
- name: Publish Docs
|
||||
env:
|
||||
FERN_TOKEN: ${{ secrets.FERN_TOKEN }}
|
||||
|
||||
14
.github/workflows/sdk-release.yml
vendored
14
.github/workflows/sdk-release.yml
vendored
@@ -1,5 +1,4 @@
|
||||
name: Build Skyvern SDK and publish to PyPI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
@@ -7,7 +6,6 @@ on:
|
||||
- main
|
||||
paths:
|
||||
- 'pyproject.toml'
|
||||
|
||||
jobs:
|
||||
check-version-change:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -17,7 +15,6 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- name: Check if version changed
|
||||
id: check
|
||||
run: |
|
||||
@@ -35,12 +32,10 @@ jobs:
|
||||
echo "Version remained at $CURRENT_VERSION"
|
||||
echo "version_changed=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
run-ci:
|
||||
needs: check-version-change
|
||||
if: needs.check-version-change.outputs.version_changed == 'true'
|
||||
uses: ./.github/workflows/ci.yml
|
||||
|
||||
build-sdk:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [check-version-change, run-ci]
|
||||
@@ -48,13 +43,11 @@ jobs:
|
||||
steps:
|
||||
- name: Check out Git repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# If you wanted to use multiple Python versions, you'd have specify a matrix in the job and
|
||||
# reference the matrixe python version here.
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
# Cache the installation of Poetry itself, e.g. the next step. This prevents the workflow
|
||||
# from installing Poetry every time, which can be slow. Note the use of the Poetry version
|
||||
# number in the cache key, and the "-0" suffix: this allows you to invalidate the cache
|
||||
@@ -65,7 +58,6 @@ jobs:
|
||||
with:
|
||||
path: ~/.local
|
||||
key: poetry-1.7.1
|
||||
|
||||
# Install Poetry. You could do this manually, or there are several actions that do this.
|
||||
# `snok/install-poetry` seems to be minimal yet complete, and really just calls out to
|
||||
# Poetry's default install script, which feels correct. I pin the Poetry version here
|
||||
@@ -80,7 +72,6 @@ jobs:
|
||||
version: 1.7.1
|
||||
virtualenvs-create: true
|
||||
virtualenvs-in-project: true
|
||||
|
||||
# Cache your dependencies (i.e. all the stuff in your `pyproject.toml`). Note the cache
|
||||
# key: if you're using multiple Python versions, or multiple OSes, you'd need to include
|
||||
# them in the cache key. I'm not, so it can be simple and just depend on the poetry.lock.
|
||||
@@ -90,25 +81,20 @@ jobs:
|
||||
with:
|
||||
path: .venv
|
||||
key: pydeps-${{ hashFiles('**/poetry.lock') }}
|
||||
|
||||
# Install dependencies. `--no-root` means "install all dependencies but not the project
|
||||
# itself", which is what you want to avoid caching _your_ code. The `if` statement
|
||||
# ensures this only runs on a cache miss.
|
||||
- run: poetry install --no-interaction --no-root
|
||||
if: steps.cache-deps.outputs.cache-hit != 'true'
|
||||
|
||||
# Now install _your_ project. This isn't necessary for many types of projects -- particularly
|
||||
# things like Django apps don't need this. But it's a good idea since it fully-exercises the
|
||||
# pyproject.toml and makes that if you add things like console-scripts at some point that
|
||||
# they'll be installed and working.
|
||||
- run: poetry install --no-interaction
|
||||
|
||||
- name: Clean dist directory
|
||||
run: rm -rf dist
|
||||
|
||||
- name: Build Package
|
||||
run: poetry build
|
||||
|
||||
- name: Publish to PyPI
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
|
||||
2
.github/workflows/update-openapi.yml
vendored
2
.github/workflows/update-openapi.yml
vendored
@@ -1,10 +1,8 @@
|
||||
name: Update OpenAPI Specification
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
update-openapi:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
6
.github/workflows/version-bump.yml
vendored
6
.github/workflows/version-bump.yml
vendored
@@ -1,9 +1,7 @@
|
||||
name: Version Bump on Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
update-version:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -12,17 +10,14 @@ jobs:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Extract version from release
|
||||
id: get_version
|
||||
run: |
|
||||
VERSION=${GITHUB_REF#refs/tags/v}
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Update version in pyproject.toml
|
||||
run: |
|
||||
sed -i "s/version = \".*\"/version = \"${{ steps.get_version.outputs.version }}\"/" pyproject.toml
|
||||
|
||||
- name: Create Pull Request
|
||||
id: create-pr
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
@@ -32,7 +27,6 @@ jobs:
|
||||
body: "Auto-generated PR to update version in pyproject.toml"
|
||||
branch: "version-bump/${{ steps.get_version.outputs.version }}"
|
||||
delete-branch: true
|
||||
|
||||
- name: Enable Pull Request Automerge
|
||||
if: steps.create-pr.outputs.pull-request-number
|
||||
run: |
|
||||
|
||||
@@ -36,7 +36,6 @@ repos:
|
||||
^skyvern/client/.*|
|
||||
^skyvern/__init__.py
|
||||
)
|
||||
|
||||
- repo: https://github.com/pre-commit/pygrep-hooks
|
||||
rev: v1.10.0
|
||||
hooks:
|
||||
@@ -44,7 +43,6 @@ repos:
|
||||
- id: python-check-mock-methods
|
||||
- id: python-no-log-warn
|
||||
- id: python-use-type-annotations
|
||||
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.14.1
|
||||
hooks:
|
||||
@@ -65,7 +63,6 @@ repos:
|
||||
^alembic.*|
|
||||
^skyvern/client/.*
|
||||
)
|
||||
|
||||
- repo: https://github.com/PyCQA/autoflake
|
||||
rev: v2.3.1
|
||||
hooks:
|
||||
@@ -101,4 +98,7 @@ repos:
|
||||
rev: v0.10.0
|
||||
hooks:
|
||||
- id: shellcheck
|
||||
|
||||
- repo: https://github.com/google/yamlfmt
|
||||
rev: v0.17.0
|
||||
hooks:
|
||||
- id: yamlfmt
|
||||
|
||||
@@ -17,7 +17,6 @@ services:
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
skyvern:
|
||||
image: public.ecr.aws/skyvern/skyvern:latest
|
||||
restart: on-failure
|
||||
@@ -45,7 +44,6 @@ services:
|
||||
# "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="C:\chrome-cdp-profile" --no-first-run --no-default-browser-check
|
||||
# /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222 --user-data-dir="/Users/yourusername/chrome-cdp-profile" --no-first-run --no-default-browser-check
|
||||
# - BROWSER_REMOTE_DEBUGGING_URL=http://host.docker.internal:9222/
|
||||
|
||||
# =========================
|
||||
# LLM Settings - Recommended to use skyvern CLI, `skyvern init llm` to setup your LLM's
|
||||
# =========================
|
||||
@@ -120,7 +118,6 @@ services:
|
||||
# - BITWARDEN_CLIENT_ID=FILL_ME_IN_PLEASE
|
||||
# - BITWARDEN_CLIENT_SECRET=FILL_ME_IN_PLEASE
|
||||
# - BITWARDEN_MASTER_PASSWORD=FILL_ME_IN_PLEASE
|
||||
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
@@ -129,7 +126,6 @@ services:
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
skyvern-ui:
|
||||
image: public.ecr.aws/skyvern/skyvern-ui:latest
|
||||
restart: on-failure
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
# yaml-language-server: $schema=https://schema.buildwithfern.dev/generators-yml.json
|
||||
|
||||
auth-schemes:
|
||||
ApiKeyScheme:
|
||||
header: x-api-key
|
||||
type: string
|
||||
name: x-api-key
|
||||
|
||||
api:
|
||||
auth: ApiKeyScheme
|
||||
specs:
|
||||
@@ -14,8 +12,6 @@ api:
|
||||
overrides: openapi/overrides.yml
|
||||
settings:
|
||||
title-as-schema-name: false
|
||||
|
||||
|
||||
groups:
|
||||
python-sdk:
|
||||
generators:
|
||||
|
||||
1077
integrations/n8n/pnpm-lock.yaml
generated
1077
integrations/n8n/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user