Skip to content

Update GitHub Actions workflows #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 18 additions & 19 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---

name: "CodeQL"

on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '20 11 * * 1'

Expand All @@ -22,22 +23,20 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'python' ]
language: ['python']

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

# 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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Checkout repository
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
22 changes: 7 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
---

name: Linting
on: [pull_request]

Expand All @@ -6,21 +8,16 @@ jobs:
name: flake8
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python 3
uses: actions/setup-python@v1
uses: actions/setup-python@v3

- name: Install flake8
run: pip3 install flake8

- name: Set up reviewdog
run: |
mkdir -p "$HOME/bin"
curl -sfL \
https://github.com/reviewdog/reviewdog/raw/master/install.sh | \
sh -s -- -b "$HOME/bin"
echo "$HOME/bin" >> $GITHUB_PATH
uses: reviewdog/action-setup@v1

- name: Run flake8
env:
Expand All @@ -35,7 +32,7 @@ jobs:
name: caddyfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install caddy
run: |
Expand All @@ -48,12 +45,7 @@ jobs:
sudo apt install caddy

- name: Set up reviewdog
run: |
mkdir -p "$HOME/bin"
curl -sfL \
https://github.com/reviewdog/reviewdog/raw/master/install.sh | \
sh -s -- -b "$HOME/bin"
echo "$HOME/bin" >> $GITHUB_PATH
uses: reviewdog/action-setup@v1

- name: Run caddy validate
run: caddy validate
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
matrix:
python-version: ["3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand Down