Skip to content

Add n8n custom node for Codegen API integration #1613

Add n8n custom node for Codegen API integration

Add n8n custom node for Codegen API integration #1613

Workflow file for this run

name: Test
on:
push:
branches: [develop, main]
pull_request:
branches: [develop, main]
workflow_dispatch:
jobs:
access-check:
runs-on: ubuntu-latest
# Skip the access check if the triggering actor is the Codegen bot
if: github.triggering_actor != 'codegen-sh[bot]'
steps:
- uses: actions-cool/check-user-permission@v2
with:
require: write
username: ${{ github.triggering_actor }}
error-if-missing: true
unit-tests:
# Only need access-check if not the bot
needs: ${{ github.triggering_actor != 'codegen-sh[bot]' && fromJSON('["access-check"]') || fromJSON('[]') }}

Check failure on line 24 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / Test

Invalid workflow file

The workflow is not valid. .github/workflows/test.yml (Line: 24, Col: 12): Unrecognized named-value: 'github'. Located at position 1 within expression: github.triggering_actor != 'codegen-sh[bot]' && fromJSON('["access-check"]') || fromJSON('[]') .github/workflows/test.yml (Line: 47, Col: 12): Unrecognized named-value: 'github'. Located at position 1 within expression: github.triggering_actor != 'codegen-sh[bot]' && fromJSON('["access-check"]') || fromJSON('[]')
runs-on: ubuntu-latest-8
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests
run: |
python -m pytest -xvs tests/unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
codemod-tests:
# Only need access-check if not the bot
needs: ${{ github.triggering_actor != 'codegen-sh[bot]' && fromJSON('["access-check"]') || fromJSON('[]') }}
# TODO: re-enable when this check is a develop required check
if: false
runs-on: ubuntu-latest-32
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests
run: |
python -m pytest -xvs tests/codemod
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
parse-tests:
# Only need access-check if not the bot
needs: ${{ github.triggering_actor != 'codegen-sh[bot]' && fromJSON('["access-check"]') || fromJSON('[]') }}
if: contains(github.event.pull_request.labels.*.name, 'parse-tests') || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest-32
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests
run: |
python -m pytest -xvs tests/parse
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
integration-tests:
# Only need access-check if not the bot
needs: ${{ github.triggering_actor != 'codegen-sh[bot]' && fromJSON('["access-check"]') || fromJSON('[]') }}
runs-on: ubuntu-latest-16
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Run tests
run: |
python -m pytest -xvs tests/integration
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}