From ea3c3cfe7025e1a8f20742b20f30744699e7d4f2 Mon Sep 17 00:00:00 2001 From: Scott Jungling Date: Tue, 27 Aug 2024 08:59:55 -0700 Subject: [PATCH] fix: sentence casing fix (#61) * fix: sentence casing fix * chore: update actions to run on PRs * chore: update publish workflow to use check workflow * chore: add concurrency check --- .github/workflows/checks.yml | 23 ++++++++++--------- .github/workflows/publish.yml | 15 ++++-------- .../specs/dependency_usage_violin_nuget.yml | 2 +- 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index a7873cf..ef7ec11 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -1,30 +1,31 @@ name: Run quality checks -# on all branches on: - push: - branches: - - '*' + workflow_call: + workflow_dispatch: + pull_request: + branches: [main] + +concurrency: + group: "checks ${{ github.ref }}" + cancel-in-progress: true jobs: - publish: + ci: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - uses: actions/setup-python@v5 with: python-version: 3.8 + cache: "pip" - name: Install dependencies run: | python -m pip install --upgrade pip pip install ".[ci]" - name: Check sentence casing - run: | - poe check-sentence-casing + run: poe check-sentence-casing - name: Check options - run: | - poe check-options + run: poe check-options diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0c9eb2c..1587156 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,15 +15,18 @@ on: - patch jobs: + check: + uses: ./.github/workflows/checks.yml + secrets: inherit publish: + needs: [check] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - uses: actions/setup-python@v5 with: python-version: 3.8 + cache: "pip" - name: Install dependencies run: | python -m pip install --upgrade pip @@ -31,14 +34,6 @@ jobs: pip install twine pip install ".[ci]" - - name: Check sentence casing - run: | - poe check-sentence-casing - - - name: Check options - run: | - poe check-options - - name: Bump version and commit change run: | semantic-release version --${{ github.event.inputs.scope }} diff --git a/moderne_visualizations_misc/specs/dependency_usage_violin_nuget.yml b/moderne_visualizations_misc/specs/dependency_usage_violin_nuget.yml index 170508c..289cc97 100644 --- a/moderne_visualizations_misc/specs/dependency_usage_violin_nuget.yml +++ b/moderne_visualizations_misc/specs/dependency_usage_violin_nuget.yml @@ -1,7 +1,7 @@ --- type: specs.moderne.io/v1beta/visualization name: io.moderne.DependencyUsageViolinNuget -displayName: C# Dependency usage +displayName: C# dependency usage description: > See the distribution of dependencies by version. recipe: