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

Add lila github action #73

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Add lila github action #73

wants to merge 15 commits into from

Conversation

fitztrev
Copy link
Member

This adds a CI workflow that runs an instance of lila within. It uses lila-db-seed to create users, api tokens, games, etc.

This could be used to test Berserk by having it make actual requests and then verifying the response. I included a sample script as a proof of concept.

The image is created from here: lichess-org/lila-docker#62 It publishes the image to Github's container registry, which is where this github action then pulls it from.

@kraktus
Copy link
Member

kraktus commented Mar 1, 2024

Very nice! This could help for #65 (checking in things break) with head, mainly.

The only caveat I see is the inability to run it locally(?).

@fitztrev
Copy link
Member Author

fitztrev commented Mar 2, 2024

The only caveat I see is the inability to run it locally(?).

Correct. I'll see if I can improve the DX.

@fitztrev fitztrev marked this pull request as draft March 2, 2024 15:46
@fitztrev fitztrev marked this pull request as ready for review March 2, 2024 21:58
@fitztrev
Copy link
Member Author

fitztrev commented Mar 2, 2024

Updated it to work locally as well as with Github Actions.

The local workflow is designed to not conflict with another local instance of lila you may have running. The tests run in containers within their own bridge network to mimic the Github Actions workflow.

Each time the tests run, it's a clean instance of lila and a fresh lila-db-seed database. The tests can change the database and it will be reset on the next run.

To run locally:

./integration/local

File names and structure can all change. Just tried to get things working. There are now 2 types of Pytest files: the existing ones from /tests and now /integration. Added 2 sample test files.

@kraktus
Copy link
Member

kraktus commented Mar 17, 2024

Hey, haven't forgotten about this, will check later this week.

@fitztrev
Copy link
Member Author

Thanks. @tors42 has implemented it on chariot too and added a few additional integration tests -- board play and game seek.

git clone https://github.com/tors42/chariot.git
cd chariot
./build/integration/local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants