Skip to content

chore: try python lint #10

chore: try python lint

chore: try python lint #10

Workflow file for this run

name: Lint if snapshots change
on:
workflow_dispatch:
push:
branches:
- "**"
paths:
- ".github/workflows/lint.yaml"
- "test/aidbox_sdk/snapshots/**"
- "resources/sdk/**"
jobs:
mark-changed-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set environment variables for changed files
id: set-env
run: |
CHANGED_FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }})
echo "Changed files: $CHANGED_FILES"
echo "CHANGED_FILES=$CHANGED_FILES" >> $GITHUB_ENV
lint-typescript:
needs: mark-changed-files
if: contains(env.CHANGED_FILES, 'test/aidbox_sdk/snapshots/typescript') || contains(env.CHANGED_FILES, 'resources/sdk/typescript')

Check failure on line 28 in .github/workflows/lint.yaml

View workflow run for this annotation

GitHub Actions / Lint if snapshots change

Invalid workflow file

The workflow is not valid. .github/workflows/lint.yaml (Line: 28, Col: 9): Unrecognized named-value: 'env'. Located at position 10 within expression: contains(env.CHANGED_FILES, 'test/aidbox_sdk/snapshots/typescript') || contains(env.CHANGED_FILES, 'resources/sdk/typescript') .github/workflows/lint.yaml (Line: 54, Col: 9): Unrecognized named-value: 'env'. Located at position 10 within expression: contains(env.CHANGED_FILES, 'test/aidbox_sdk/snapshots/python') || contains(env.CHANGED_FILES, 'resources/sdk/python')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Merge TypeScript SDK files
run: |
cp -r -u resources/sdk/typescript/* test/aidbox_sdk/snapshots/typescript/
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: "npm"
cache-dependency-path: test/aidbox_sdk/snapshots/typescript/package-lock.json
- name: Install system and client dependencies
run: |
sudo apt -y update
cd test/aidbox_sdk/snapshots/typescript && npm ci
- name: Run ESLint
run: cd test/aidbox_sdk/snapshots/typescript && npm run lint
lint-python:
needs: mark-changed-files
if: contains(env.CHANGED_FILES, 'test/aidbox_sdk/snapshots/python') || contains(env.CHANGED_FILES, 'resources/sdk/python')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Merge Python SDK files
run: |
cp -r -u resources/sdk/python/* test/aidbox_sdk/snapshots/python/
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install system and client dependencies
run: |
cd test/aidbox_sdk/snapshots/python && pip install './[dev]'
- name: Run python lint
run: cd test/aidbox_sdk/snapshots/python && pylint **/*.py