potiuk commented on PR #29935:
URL: https://github.com/apache/airflow/pull/29935#issuecomment-1465276483

   > I have added a new .yml file containing the steps I was able to guess in 
order for the test procedure. Things I don't now are:
   > 
   > * What should be the trigger for the action (e.g. on [push])?
   
   * push and pull request  are both fine - one is for  PR and another is when 
your PR gets merged to main (regression testing)
   
   > * How do I install the dependencies required by airflow during testing? So 
far I have just installed pytest.
   
   Just `pip install ".[devel]"` for now should do - it will install airflow 
and all the development dependencies (but no providers and their dependencies - 
those would take considerably longer.
   
   > * What is the command to use, to run the tests you suggested?
   
   Taking it from the current tests (just looked at the output). That would be 
good start I think:
   
   ```
   pytest --verbosity=0 --strict-markers --durations=100 --maxfail=50 
--color=yes --junitxml=/files/test_result-Always-sqlite.xml --timeouts-order 
moi --setup-timeout=60 --execution-timeout=60 --teardown-timeout=60 
--output=/files/warnings-Always-sqlite.txt --disable-warnings -rfEX 
--with-db-init --ignore tests/providers --ignore tests/charts tests
   ```
   
   > * Is there a way to debug this?
   
   Yep. What this sequence does can be repeated - locally create a venv, 
install airflow and run tests. There is little need to run the whole workflow 
in such a simple case - my approach is usually to run it locally and once I 
think it's good to test - push it to PR (and let it do the stuff). There is 
also https://github.com/nektos/act to simulate the whole GA environment (sort 
of) but in your case, if you have a windows machine runnig `pip`  or `pytests` 
commands as individual steps do not really require it
   
   > I am sure those things are quite obvious once you know the process, but I 
tried to research those things with the provided resources, google and the 
existing actions and am not sure what to do exactly.
   
   Yeah. "actions" are overrated. I tend to use them for very standard stuff 
that you likely already have locally (like checkout the repo or install python) 
and all the rest shoudl be just commands you can repeat locally.
   
   This is it for now no more is needed (just fixing the indentaion in the .yml 
file - I recommend intellij/vscode support for the github action yaml (they 
come built-in with github plugins I think) - they will help wiht making the 
yaml file validated and provide autocompletion.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to