Skip to content
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

Configure the lint CI action to use tox #116

Open
phoevos opened this issue Aug 16, 2023 · 0 comments
Open

Configure the lint CI action to use tox #116

phoevos opened this issue Aug 16, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@phoevos
Copy link
Contributor

phoevos commented Aug 16, 2023

Currently, our CI workflow manually configures a lint action to check the charm code:

lint:
name: Lint
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Install dependencies
run: |
set -eux
sudo apt update
sudo apt install python3-setuptools
sudo pip3 install black flake8
- name: Check black
run: black --check charms/*/src
- name: Check flake8
run: flake8 ./charms/*/src

This is unfortunate for a few reasons:

  • It doesn't leverage the already configured tox test environments
  • It uses different tools for linting (hence, testing locally with tox can produce different results)
  • It leaves out a big part of the code, namely all tests

Goal

Configure the lint CI action to use tox, making sure that both the top-level (e.g. tests) and charm-specific (e.g. charms/katib-controller/tests) directories are checked.

@phoevos phoevos added the bug Something isn't working label Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant