From 5b3fc86cfd67b02a32151f8898d76fd98e7fa142 Mon Sep 17 00:00:00 2001 From: Erick Friis Date: Thu, 1 Feb 2024 11:09:37 -0800 Subject: [PATCH] infra: ci naming (#16890) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make it clearer how to run equivalent commands locally Not a perfect 1:1, but will help people get started ![Screenshot 2024-02-01 at 10 53 34 AM](https://github.com/langchain-ai/langchain/assets/9557659/da271aaf-d5db-41e3-9379-cb1d8a0232c5) --- .github/workflows/_all_ci.yml | 6 +++- .../workflows/_compile_integration_test.yml | 2 +- .github/workflows/_dependencies.yml | 2 +- .github/workflows/_lint.yml | 1 + .github/workflows/_test.yml | 2 +- .github/workflows/check_diffs.yml | 3 +- .github/workflows/codespell.yml | 4 +-- .github/workflows/doc_lint.yml | 4 ++- .github/workflows/templates_ci.yml | 36 ------------------- 9 files changed, 16 insertions(+), 44 deletions(-) delete mode 100644 .github/workflows/templates_ci.yml diff --git a/.github/workflows/_all_ci.yml b/.github/workflows/_all_ci.yml index a2c4e06d6c..61caad6ebd 100644 --- a/.github/workflows/_all_ci.yml +++ b/.github/workflows/_all_ci.yml @@ -36,30 +36,35 @@ env: jobs: lint: + name: make lint uses: ./.github/workflows/_lint.yml with: working-directory: ${{ inputs.working-directory }} secrets: inherit test: + name: make test uses: ./.github/workflows/_test.yml with: working-directory: ${{ inputs.working-directory }} secrets: inherit compile-integration-tests: + name: poetry run pytest -m compile tests/integration_tests uses: ./.github/workflows/_compile_integration_test.yml with: working-directory: ${{ inputs.working-directory }} secrets: inherit dependencies: + name: check dependencies uses: ./.github/workflows/_dependencies.yml with: working-directory: ${{ inputs.working-directory }} secrets: inherit extended-tests: + name: make extended_tests / python${{ matrix.python-version }} runs-on: ubuntu-latest strategy: matrix: @@ -68,7 +73,6 @@ jobs: - "3.9" - "3.10" - "3.11" - name: Python ${{ matrix.python-version }} extended tests defaults: run: working-directory: ${{ inputs.working-directory }} diff --git a/.github/workflows/_compile_integration_test.yml b/.github/workflows/_compile_integration_test.yml index 12cd3d737b..750ce00a77 100644 --- a/.github/workflows/_compile_integration_test.yml +++ b/.github/workflows/_compile_integration_test.yml @@ -24,7 +24,7 @@ jobs: - "3.9" - "3.10" - "3.11" - name: Python ${{ matrix.python-version }} + name: python${{ matrix.python-version }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/_dependencies.yml b/.github/workflows/_dependencies.yml index 1414f63472..4c46047969 100644 --- a/.github/workflows/_dependencies.yml +++ b/.github/workflows/_dependencies.yml @@ -28,7 +28,7 @@ jobs: - "3.9" - "3.10" - "3.11" - name: dependencies - Python ${{ matrix.python-version }} + name: dependency checks / python${{ matrix.python-version }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/_lint.yml b/.github/workflows/_lint.yml index 07978a25cf..a6e12761d9 100644 --- a/.github/workflows/_lint.yml +++ b/.github/workflows/_lint.yml @@ -21,6 +21,7 @@ env: jobs: build: + name: python${{ matrix.python-version }} runs-on: ubuntu-latest strategy: matrix: diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index 55c5f79fcb..d2552d3ecc 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -28,7 +28,7 @@ jobs: - "3.9" - "3.10" - "3.11" - name: Python ${{ matrix.python-version }} + name: python${{ matrix.python-version }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/check_diffs.yml b/.github/workflows/check_diffs.yml index 83dd2d5863..9a2e11dd3a 100644 --- a/.github/workflows/check_diffs.yml +++ b/.github/workflows/check_diffs.yml @@ -1,5 +1,5 @@ --- -name: Check library diffs +name: CI on: push: @@ -32,6 +32,7 @@ jobs: outputs: dirs-to-run: ${{ steps.set-matrix.outputs.dirs-to-run }} ci: + name: cd ${{ matrix.working-directory }} needs: [ build ] strategy: matrix: diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 82474e9289..a5a63b996d 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -1,5 +1,5 @@ --- -name: Codespell +name: CI / cd . / make spell_check on: push: @@ -12,7 +12,7 @@ permissions: jobs: codespell: - name: Check for spelling errors + name: (Check for spelling errors) runs-on: ubuntu-latest steps: diff --git a/.github/workflows/doc_lint.yml b/.github/workflows/doc_lint.yml index 7a236dc8bb..b1d1932672 100644 --- a/.github/workflows/doc_lint.yml +++ b/.github/workflows/doc_lint.yml @@ -1,5 +1,5 @@ --- -name: Docs, templates, cookbook lint +name: CI / cd . on: push: @@ -15,6 +15,7 @@ on: jobs: check: + name: Check for "from langchain import x" imports runs-on: ubuntu-latest steps: @@ -28,6 +29,7 @@ jobs: git grep 'from langchain import' {docs/docs,templates,cookbook} | grep -vE 'from langchain import (hub)' && exit 1 || exit 0 lint: + name: make lint uses: ./.github/workflows/_lint.yml with: diff --git a/.github/workflows/templates_ci.yml b/.github/workflows/templates_ci.yml deleted file mode 100644 index b886fc7aaf..0000000000 --- a/.github/workflows/templates_ci.yml +++ /dev/null @@ -1,36 +0,0 @@ ---- -name: templates CI - -on: - push: - branches: [ master ] - pull_request: - paths: - - '.github/actions/poetry_setup/action.yml' - - '.github/tools/**' - - '.github/workflows/_lint.yml' - - '.github/workflows/templates_ci.yml' - - 'templates/**' - workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI - -# If another push to the same PR or branch happens while this workflow is still running, -# cancel the earlier run in favor of the next run. -# -# There's no point in testing an outdated version of the code. GitHub only allows -# a limited number of job runners to be active at the same time, so it's better to cancel -# pointless jobs early so that more useful jobs can run sooner. -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -env: - POETRY_VERSION: "1.7.1" - WORKDIR: "templates" - -jobs: - lint: - uses: - ./.github/workflows/_lint.yml - with: - working-directory: templates - secrets: inherit