From 07e2825c529b67773adccd1da1db7569d6831a57 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 18 Sep 2022 15:17:28 -0500 Subject: [PATCH 1/3] ci(tests): Split out pypi release to avoid docker pull --- .github/workflows/tests.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d91d87f..56ffe09 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -43,6 +43,27 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} + release: + runs-on: ubuntu-latest + needs: build + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + + strategy: + matrix: + python-version: ["3.10"] + + steps: + - uses: actions/checkout@v3 + + - name: Install poetry + run: pipx install "poetry==1.1.15" + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: 'poetry' + - name: Build package if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') run: poetry build From bf2ffe5dac2af673c1a9399c266c7352fa7d6978 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 18 Sep 2022 15:17:53 -0500 Subject: [PATCH 2/3] ci(codeql): Cleanup and update to latest actions --- .github/workflows/codeql-analysis.yml | 53 ++++----------------------- 1 file changed, 8 insertions(+), 45 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index fa81424..5da69bd 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,24 +1,12 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# name: "CodeQL" on: push: - branches: [ main ] + branches: [ master ] pull_request: - # The branches below must be a subset of the branches above - branches: [ main ] + branches: [ master ] schedule: - - cron: '24 12 * * 2' + - cron: '16 5 * * 2' jobs: analyze: @@ -29,42 +17,17 @@ jobs: contents: read security-events: write - strategy: - fail-fast: false - matrix: - language: [ 'python' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] - # Learn more about CodeQL language support at https://git.io/codeql-language-support - steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main + languages: "python" - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 - - # â„šī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release + uses: github/codeql-action/autobuild@v2 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 From 207e75940d3ae829d2dc50b8df8371e535952e95 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 18 Sep 2022 15:34:16 -0500 Subject: [PATCH 3/3] docs(CHANGES): Note CI updates --- CHANGES | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index 8d8acdf..6357a04 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,13 @@ $ pipx install --suffix=@next g --pip-args '\--pre' --force - _Add your latest changes from PRs here_ +### Infrastructure + +- CI speedups (#8) + + - Split out release to separate job so the PyPI Upload docker image isn't pulled on normal runs + - Clean up CodeQL + ## g 0.0.2 (2022-09-11) **Maintenance only release, no bug fixes or features**