Skip to content

Commit

Permalink
Run: prettier --single-quote '.github/**/*.{yml,yaml}' --write
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Sep 17, 2023
1 parent e50a844 commit 31bffd0
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 102 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]
schedule:
- cron: '16 5 * * 2'

Expand All @@ -18,16 +18,16 @@ jobs:
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: "python"
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: 'python'

- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
116 changes: 58 additions & 58 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,70 +10,70 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.11' ]
python-version: ['3.11']
steps:
- uses: actions/checkout@v3
- name: Filter changed file paths to outputs
uses: dorny/paths-filter@v2.7.0
id: changes
with:
filters: |
root_docs:
- CHANGES
- README.*
docs:
- 'docs/**'
- 'examples/**'
python_files:
- 'src/django_slugify_processor/**'
- pyproject.toml
- poetry.lock
- uses: actions/checkout@v3
- name: Filter changed file paths to outputs
uses: dorny/paths-filter@v2.7.0
id: changes
with:
filters: |
root_docs:
- CHANGES
- README.*
docs:
- 'docs/**'
- 'examples/**'
python_files:
- 'src/django_slugify_processor/**'
- pyproject.toml
- poetry.lock
- name: Should publish
if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV
- name: Should publish
if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true'
run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV

- name: Install poetry
if: env.PUBLISH == 'true'
run: pipx install "poetry==1.6.1"
- name: Install poetry
if: env.PUBLISH == 'true'
run: pipx install "poetry==1.6.1"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
if: env.PUBLISH == 'true'
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
if: env.PUBLISH == 'true'
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'

- name: Install dependencies [w/ docs]
if: env.PUBLISH == 'true'
run: poetry install --extras "docs lint"
- name: Install dependencies [w/ docs]
if: env.PUBLISH == 'true'
run: poetry install --extras "docs lint"

- name: Print python versions
if: env.PUBLISH == 'true'
run: |
python -V
poetry run python -V
- name: Print python versions
if: env.PUBLISH == 'true'
run: |
python -V
poetry run python -V
- name: Build documentation
if: env.PUBLISH == 'true'
run: |
pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd
- name: Build documentation
if: env.PUBLISH == 'true'
run: |
pushd docs; make SPHINXBUILD='poetry run sphinx-build' html; popd
- name: Push documentation to S3
if: env.PUBLISH == 'true'
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-west-1" # optional: defaults to us-east-1
SOURCE_DIR: "docs/_build/html" # optional: defaults to entire repository
- name: Push documentation to S3
if: env.PUBLISH == 'true'
uses: jakejarvis/s3-sync-action@v0.5.1
with:
args: --acl public-read --follow-symlinks --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'us-west-1' # optional: defaults to us-east-1
SOURCE_DIR: 'docs/_build/html' # optional: defaults to entire repository

- name: Purge cache on Cloudflare
if: env.PUBLISH == 'true'
uses: jakejarvis/cloudflare-purge-action@v0.3.0
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
- name: Purge cache on Cloudflare
if: env.PUBLISH == 'true'
uses: jakejarvis/cloudflare-purge-action@v0.3.0
env:
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
62 changes: 31 additions & 31 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,46 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
django-version: [ '2.2', '3.1', '3.2', '4.0', '4.1', '4.2' ]
python-version: ['3.8', '3.9', '3.10', '3.11']
django-version: ['2.2', '3.1', '3.2', '4.0', '4.1', '4.2']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Install poetry
run: pipx install "poetry==1.6.1"
- name: Install poetry
run: pipx install "poetry==1.6.1"

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'poetry'

- name: Install dependencies
run: |
poetry install -E "docs test coverage lint"
poetry run pip install DJANGO~=${{ matrix.django-version }}
- name: Install dependencies
run: |
poetry install -E "docs test coverage lint"
poetry run pip install DJANGO~=${{ matrix.django-version }}
- name: Install django-extensions @ version, if exists
if: ${{ matrix.django-extensions != '' }}
run: poetry run pip install 'django-extensions${{ matrix.django-extensions }}'
- name: Install django-extensions @ version, if exists
if: ${{ matrix.django-extensions != '' }}
run: poetry run pip install 'django-extensions${{ matrix.django-extensions }}'

- name: Print python versions
run: |
python -V
poetry run python -V
- name: Print python versions
run: |
python -V
poetry run python -V
- name: Lint with ruff
run: poetry run ruff .
- name: Lint with ruff
run: poetry run ruff .

- name: Lint with mypy
run: poetry run mypy .
- name: Lint with mypy
run: poetry run mypy .

- name: Test with pytest
run: poetry run py.test --cov=./ --cov-report=xml
- name: Test with pytest
run: poetry run py.test --cov=./ --cov-report=xml

- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
- uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}

release:
runs-on: ubuntu-latest
Expand All @@ -57,7 +57,7 @@ jobs:

strategy:
matrix:
python-version: ["3.11"]
python-version: ['3.11']

steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit 31bffd0

Please sign in to comment.