Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 133c66d

Browse filesBrowse files
committed
ci: Backport latest github workflow from v0.16.5
1 parent c0e3692 commit 133c66d
Copy full SHA for 133c66d

File tree

Expand file treeCollapse file tree

3 files changed

+45
-86
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+45
-86
lines changed

‎.github/workflows/codeql-analysis.yml

Copy file name to clipboard
+6-43Lines changed: 6 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,12 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
121
name: "CodeQL"
132

143
on:
154
push:
165
branches: [ master ]
176
pull_request:
18-
# The branches below must be a subset of the branches above
197
branches: [ master ]
208
schedule:
21-
- cron: '21 7 * * 4'
9+
- cron: '16 5 * * 2'
2210

2311
jobs:
2412
analyze:
@@ -29,42 +17,17 @@ jobs:
2917
contents: read
3018
security-events: write
3119

32-
strategy:
33-
fail-fast: false
34-
matrix:
35-
language: [ 'python' ]
36-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37-
# Learn more about CodeQL language support at https://git.io/codeql-language-support
38-
3920
steps:
4021
- name: Checkout repository
41-
uses: actions/checkout@v2
22+
uses: actions/checkout@v3
4223

43-
# Initializes the CodeQL tools for scanning.
4424
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v1
25+
uses: github/codeql-action/init@v2
4626
with:
47-
languages: ${{ matrix.language }}
48-
# If you wish to specify custom queries, you can do so here or in a config file.
49-
# By default, queries listed here will override any specified in a config file.
50-
# Prefix the list here with "+" to use these queries and those in the config file.
51-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
27+
languages: "python"
5228

53-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54-
# If this step fails, then you should remove it and run the build manually (see below)
5529
- name: Autobuild
56-
uses: github/codeql-action/autobuild@v1
57-
58-
# ℹ️ Command-line programs to run using the OS shell.
59-
# 📚 https://git.io/JvXDl
60-
61-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62-
# and modify them (or add more) to build your code if your project
63-
# uses a compiled language
64-
65-
#- run: |
66-
# make bootstrap
67-
# make release
30+
uses: github/codeql-action/autobuild@v2
6831

6932
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@v1
33+
uses: github/codeql-action/analyze@v2

‎.github/workflows/docs.yml

Copy file name to clipboardExpand all lines: .github/workflows/docs.yml
+9-30Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,31 +34,27 @@ jobs:
3434
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
3535

3636
- name: Install poetry
37-
run: |
38-
curl -O -sSL https://install.python-poetry.org/install-poetry.py
39-
python install-poetry.py -y --version 1.1.12
40-
echo "PATH=${HOME}/.poetry/bin:${PATH}" >> $GITHUB_ENV
41-
rm install-poetry.py
37+
if: env.PUBLISH == 'true'
38+
run: pipx install "poetry==1.2.1"
4239

4340
- name: Set up Python ${{ matrix.python-version }}
44-
uses: actions/setup-python@v3
41+
if: env.PUBLISH == 'true'
42+
uses: actions/setup-python@v4
4543
with:
4644
python-version: ${{ matrix.python-version }}
4745
cache: 'poetry'
4846

49-
- name: Add ~/.local/bin to PATH
50-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
51-
5247
- name: Install dependencies [w/ docs]
53-
run: |
54-
poetry env use ${{ matrix.python-version }}
55-
poetry install --extras "docs lint"
48+
if: env.PUBLISH == 'true'
49+
run: poetry install --extras "docs lint"
5650

5751
- name: Build documentation
52+
if: env.PUBLISH == 'true'
5853
run: |
5954
pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd
6055
6156
- name: Push documentation to S3
57+
if: env.PUBLISH == 'true'
6258
uses: jakejarvis/s3-sync-action@v0.5.1
6359
with:
6460
args: --acl public-read --follow-symlinks --delete
@@ -69,25 +65,8 @@ jobs:
6965
AWS_REGION: "us-west-1" # optional: defaults to us-east-1
7066
SOURCE_DIR: "docs/_build/html" # optional: defaults to entire repository
7167

72-
- name: Generate list of changed files for CloudFront to invalidate
73-
run: |
74-
FILES=$(find docs/_build/html -exec realpath --relative-to docs/_build/html {} \; | awk '{print "/"$0}' | grep "html\|searchindex.js\|custom.css\|.svg");
75-
for file in $FILES; do
76-
echo $file
77-
# add bare directory to list of updated paths when we see index.html
78-
[[ "$file" == *"/index.html" ]] && echo $file | sed -e 's/\/index.html$/\//'
79-
done | sort | uniq | tr '\n' ' ' > .updated_files
80-
81-
- name: Invalidate on CloudFront
82-
uses: chetan/invalidate-cloudfront-action@v2.3
83-
env:
84-
DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION }}
85-
AWS_REGION: "us-east-1"
86-
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
87-
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
88-
PATHS_FROM: .updated_files
89-
9068
- name: Purge cache on Cloudflare
69+
if: env.PUBLISH == 'true'
9170
uses: jakejarvis/cloudflare-purge-action@v0.3.0
9271
env:
9372
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}

‎.github/workflows/tests.yml

Copy file name to clipboardExpand all lines: .github/workflows/tests.yml
+30-13Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,16 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v3
2222
- name: Install poetry
23-
run: |
24-
curl -O -sSL https://install.python-poetry.org/install-poetry.py
25-
python install-poetry.py -y --version 1.1.12
26-
echo "PATH=${HOME}/.poetry/bin:${PATH}" >> $GITHUB_ENV
27-
rm install-poetry.py
23+
run: pipx install "poetry==1.2.1"
2824

2925
- name: Set up Python ${{ matrix.python-version }}
30-
uses: actions/setup-python@v3
26+
uses: actions/setup-python@v4
3127
with:
3228
python-version: ${{ matrix.python-version }}
3329
cache: 'poetry'
3430

3531
- name: Install dependencies
36-
run: |
37-
# This is required to do as of @actions/checkout@v3 to prevent default python from being used
38-
poetry env use ${{ matrix.python-version }}
39-
poetry install -E "docs test coverage lint format"
32+
run: poetry install -E "docs test coverage lint format"
4033

4134
- name: Lint with flake8
4235
run: poetry run flake8
@@ -50,12 +43,36 @@ jobs:
5043
poetry run python -V
5144
5245
- name: Test with pytest
53-
run: poetry run py.test --cov=./ --cov-report=xml
54-
55-
- uses: codecov/codecov-action@v2
46+
run: poetry run py.test --cov=./ --cov-append --cov-report=xml
47+
env:
48+
COV_CORE_SOURCE: .
49+
COV_CORE_CONFIG: .coveragerc
50+
COV_CORE_DATAFILE: .coverage.eager
51+
- uses: codecov/codecov-action@v3
5652
with:
5753
token: ${{ secrets.CODECOV_TOKEN }}
5854

55+
release:
56+
runs-on: ubuntu-latest
57+
needs: build
58+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
59+
60+
strategy:
61+
matrix:
62+
python-version: ["3.10"]
63+
64+
steps:
65+
- uses: actions/checkout@v3
66+
67+
- name: Install poetry
68+
run: pipx install "poetry==1.2.1"
69+
70+
- name: Set up Python ${{ matrix.python-version }}
71+
uses: actions/setup-python@v4
72+
with:
73+
python-version: ${{ matrix.python-version }}
74+
cache: 'poetry'
75+
5976
- name: Build package
6077
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
6178
run: poetry build

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.