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

only trigger tests in workflow if something relevant has changed #6020

Closed
SimonHeimberg opened this issue Jul 14, 2023 · 5 comments
Closed
Labels
building & packaging Building, packaging, continuous integration, appdata, cmake enhancement New feature or request

Comments

@SimonHeimberg
Copy link
Contributor

SimonHeimberg commented Jul 14, 2023

Please fill out the relevant sections below and delete the rest.

Describe the bug
Tests are also run if only a file changed which has nothing to do with the code
example: #6019

Expected behavior
I suggest to skip tests on obvious cases by using ...

either paths or paths-ignore for the entire workflow (workflow-syntax-... on docs.github)
or conditions for some jobs (using-conditions-... on docs.github)

some (include) paths for ...
compile and tests: src/, data/ (should we exclude some content?), test/, cmake/ (?), regression_test.py, (probably some more)
documentation: (is fast anyway) doc/, src/, data/scripting/, data/tribes/, data/world/, data/txts/

@SimonHeimberg SimonHeimberg added the bug Something isn't working label Jul 14, 2023
@SimonHeimberg
Copy link
Contributor Author

SimonHeimberg commented Jul 14, 2023

By the way, build.yaml only checks json for data/txts/ which contains one json file.

python3 utils/validate_json.py data/txts/

I found more files:

 2 ./utils/win32
54 ./xdg/translations
(1 ./data/txts)
53 ./data/i18n/locales

Should some of those be checked as well?

@SimonHeimberg
Copy link
Contributor Author

SimonHeimberg commented Jul 14, 2023

Could one of the test suites also create an artifact? I can only download for MacOS and Windows, but not linux: https://github.com/widelands/widelands/actions/runs/5556166018#artifacts

(For pull requests, on master there is an appimage for linux)

@SimonHeimberg
Copy link
Contributor Author

To just skip steps or jobs if some files have changed, this action could help: https://github.com/dorny/paths-filter

@matthiakl
Copy link
Member

Could one of the test suites also create an artifact?

Do you have a special reason why you need the Linux artifacts? Most developers use Linux for developing and simply compile it locally. Also because of different distributions the dynamically linked binaries from Ubuntu may not work for you.

Please consider moving this issue into our discussion thread on this topic: #5880

@SimonHeimberg
Copy link
Contributor Author

Could one of the test suites also create an artifact?

Do you have a special reason why you need the Linux artifacts? Most developers use Linux for developing and simply compile it locally. Also because of different distributions the dynamically linked binaries from Ubuntu may not work for you.

Right, it would likely not work for me because of those libraries.

I would like to see how pr #6017 looks (and test if pr #6001 works on netclient). I use linux but would prefer to not install a build environment for every project I contribute to. Since I wrote this I made some tries anyway but did not yet succeed. 😞

@SimonHeimberg SimonHeimberg added enhancement New feature or request building & packaging Building, packaging, continuous integration, appdata, cmake and removed bug Something isn't working labels Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building & packaging Building, packaging, continuous integration, appdata, cmake enhancement New feature or request
Projects
None yet
3 participants