-
-
Notifications
You must be signed in to change notification settings - Fork 819
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
Why don't you try some CI? #355
Comments
@DiddiLeija. Yes, if possible, I'd like to use CI though I've never used GitHub Action or Travis CI. |
Probably, we can start with linters, to check the code quality. Maybe later we can start with more stuff. |
xvfb-run can be used to run graphical programs, but I’m not sure if the screen can be captured and such things. CI would still be useful to check that the PRs have code that builds, passes linter checks, has documentation, etc. |
What about setting up Nox or something similar? We can use this automation tools on GitHub via GitHub Actions, and the developers can run exactly the same on their local forks. |
Big user of tox personally, but these are just tools that install dependencies and run commands, the question is still: what commands would be worth running? :) |
I was thinking about:
We can also run |
Also, we can try pre-commit, and decide between a just-check CI or enable pre-commit to fix found issues. |
Regarding lint, Pyxel already has its standard commands and settings which are combination of I have started the research for GitHub Actions. However, there are other things to do for Pyxel, and it seems that it will not end soon. |
I have some experience with Github Actions, I will add some simple config on my fork and send a PR at some point. |
Thank you! |
I have some experience with Github Actions too, but I would agree with the message of @DiddiLeija , it would be great to start with something simpler like Code Quality checks, and I don't know if something like dependabot make sense for you folks. I mean, if I can help with something it would be great, just to avoid adding the same things as @merwok |
Current Pyxel has already an auto build action. Recent releases were built by it. |
Something we can do is adding something like a
The main advantage of using the tools from step 2 is that both users (in a local clone) and CI (here, at GitHub) will run the same tests and linters, so we can follow the same code style. Also, if we set up GitHub Actions, we can run the same CI under (almost) every OS we support, and every Python we support. Here's a quick example I borrowed from one of my projects, see https://github.com/DiddiLeija/diddi-and-the-bugs/blob/main/.github/workflows/ci.yml. I modified it a bit to show some features we can use: name: Python CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: $ {{ matrix.os }} # We can run this on several OS, see below
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.7, 3.8, 3.9, "3.10"] # "3.10" goes quoted here!
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install pip dependencies
run: |
# Obligatory stuff. We can install tox instead of nox, too
python -m pip install --upgrade pip setuptools nox
# Our own deps
python -m pip install -r requirements.txt
- name: Run linters with Nox
run: |
# If we are using tox, it would be something like "tox -e {python-version} ..."
nox --non-interactive -s check-quality Of course, our Pyxel CI will be more complex, but it's an example. |
Now Pyxel has its own actions for release task. |
GitHub has the ability of having CI (Continous Integration) to run things on each commit. It can be also useful for checking PRs, running linters, etc. A good start would be GitHub Actions, but you can try other things.
If you like the idea, and would need help, please ping me.
The text was updated successfully, but these errors were encountered: