Skip to content

Commit

Permalink
add tutorial steps to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
admeeer committed Oct 11, 2023
1 parent da37596 commit c7a4bc2
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,39 @@
# cicd-tutorial
# test-automation workflow tutorial
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)



#### Getting started
These steps show you how to run the default workflow.
- Fork the repository
1. Navigate to the repository: `https://github.com/admeeer/cicd-tutorial`
2. In the top right, click the dropdown next to `Fork` and click `Create a new fork`
- Run the workflow
1. Navigate to the `Actions` tab
2. On the left, click on the `manual-build-and-test-automation` workflow
3. On the right, click `Run workflow` and then `Run workflow`

#### Customizing the tests

This tutorial assumes you have installed Git and configured it. See https://git-scm.com/ for downloading & installing.
- Clone the repository
1. Run `git clone https://github.com/admeeer/cicd-tutorial.git`
- Navigate to the cloned directory
1. Run `cd cicd-tutorial`
- Customize
1. Open `script.py` in your favorite text editor and edit the input in the `print` statement
2. Navigate to the `tests/` folder, run `cd tests/`
3. Open `test_script.py` in your favorite text editor and edit the assert to your input
- Optionally, test locally
1. Update pip, run `python3 -m pip install --upgrade pip`
2. Then, run `pip3 install pytest`
3. If in `tests/`, run `pytest test_script.py`, else, in the directory, run `pytest tests/`
- Push your local changes up to GitHub
1. Run `git add *`, note: if you modified any other files, this command will capture those changes too
2. Run `git commit -m "Customized output and modified test to assert towards new output"`
3. Run `git push`
- Check the workflows success
1. Navigate to the `Actions` tab
2. On the left, click on the `build-and-test-automation` workflow
3. Click the topmost workflow
4. Success (hopefully!)

0 comments on commit c7a4bc2

Please sign in to comment.