Skip to content

style: apply format #599

style: apply format

style: apply format #599

Workflow file for this run

# ArchCraftsman, The careful yet very fast Arch Linux Craftsman.
# Copyright (C) 2023 Rawleenc
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the dev branch
push:
branches:
- dev
- main
pull_request:
branches:
- dev
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup environment
run: pip install pylint GitPython
- name: Check
run: pylint archcraftsman launcher.py genchanges.py
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup environment
run: pip install flake8
- name: Check
run: flake8 archcraftsman launcher.py genchanges.py
pyright:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup environment
run: pip install pyright GitPython
- name: Check
run: pyright archcraftsman launcher.py genchanges.py
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup environment
run: pip install black
- name: Check
run: black --check archcraftsman launcher.py genchanges.py
bandit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup environment
run: pip install bandit
- name: Check
run: bandit -r .
license:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 'stable'
cache: false
- name: Setup environment
run: go install github.com/google/addlicense@latest
- name: Check
run: addlicense -c 'Rawleenc' -f NOTICES -check . *.py
coverage:
needs:
- pylint
- flake8
- pyright
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup environment
run: pip install coverage
- name: Test
run: |
coverage run -m unittest
coverage report
coverage html
- name: Archive code coverage results
uses: actions/upload-artifact@v3
with:
name: code-coverage-report
path: htmlcov