Update actions

pull/2060/head
Jason 1 year ago
parent 53db79ab29
commit 260c05b0d6

@ -3,7 +3,7 @@
# Othewrwise, Black is run and its changes are committed back to the incoming pull request. # Othewrwise, Black is run and its changes are committed back to the incoming pull request.
# https://github.com/cclauss/autoblack # https://github.com/cclauss/autoblack
name: autoblack name: fmt
on: on:
push: push:
branches: ["develop"] branches: ["develop"]
@ -11,11 +11,11 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v4
- name: Set up Python 3.7 - name: Set up Python 3.10
uses: actions/setup-python@v1 uses: actions/setup-python@v5
with: with:
python-version: 3.9 python-version: 3.10
- name: Install Black - name: Install Black
run: pip install black run: pip install black
- name: Run black --check . - name: Run black --check .
@ -30,3 +30,10 @@ jobs:
git checkout $GITHUB_HEAD_REF git checkout $GITHUB_HEAD_REF
git commit -am "fixup: Format Python code with Black" git commit -am "fixup: Format Python code with Black"
git push origin HEAD:develop git push origin HEAD:develop
- uses: isort/isort-action@v1
with:
requirement-files: "requirements.txt"

@ -39,7 +39,7 @@ jobs:
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL

@ -6,7 +6,10 @@ jobs:
lint: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
- uses: psf/black@stable - uses: psf/black@stable
with: with:
options: "--line-length 101" options: "--line-length 101"
- uses: isort/isort-action@v1
with:
requirement-files: "requirements.txt"

Loading…
Cancel
Save