Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kevsiraki/actions-test
GitHub Action and Unit Testing Practice
https://github.com/kevsiraki/actions-test
api development phpunit tdd
Last synced: 6 days ago
JSON representation
GitHub Action and Unit Testing Practice
- Host: GitHub
- URL: https://github.com/kevsiraki/actions-test
- Owner: kevsiraki
- Created: 2024-01-19T05:10:44.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-01-20T23:47:47.000Z (10 months ago)
- Last Synced: 2024-10-10T11:43:41.914Z (27 days ago)
- Topics: api, development, phpunit, tdd
- Language: PHP
- Homepage: https://donttrip.org/prod/root.php/items
- Size: 940 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# actions-test
This repository is a demonstration of GitHub Actions setup for automated workflows. GitHub Actions enables you to automate various tasks such as testing, building, and deploying your code directly within your GitHub repository.
## Workflow Overview
This repository includes a simple workflow that triggers on push events to the main branch. The workflow consists of the following steps:
1. **Checkout Code:** This step checks out your repository code, making it available for subsequent actions.
2. **Run Tests:** This step executes your test suite, ensuring that your code meets the specified quality and functionality standards.
3. **Build:** If applicable, this step performs any necessary build processes for your project.
4. **Deploy (Optional):** If your project involves deployment, this step can be configured to deploy your application to a specified environment.
## Getting Started
To get started with GitHub Actions in your own project, follow these steps:
1. **Create `.github/workflows` Directory:** In your repository, create a `.github/workflows` directory to store your workflow files.
2. **Define Workflow YAML File:** Create a YAML file within the `workflows` directory, defining your workflow steps, triggers, and any necessary configurations. You can use the provided `main.yml` file in this repository as a reference.
3. **Customize Workflow:** Tailor the workflow to fit the specific needs of your project. You can add or remove steps, adjust triggers, and configure environment variables.
4. **Commit and Push:** Commit your changes and push them to your main branch. GitHub Actions will automatically detect the new workflow and start executing it based on the defined triggers.
## Example Workflow File
Here's a simplified example of a workflow file (`main.yml`):
```yaml
name: CI/CD Workflowon:
push:
branches:
- mainjobs:
build:
runs-on: ubuntu-lateststeps:
- name: Checkout Code
uses: actions/checkout@v2- name: Run Tests
run: |
# Add your test commands here- name: Build
run: |
# Add your build commands here- name: Deploy
if: success()
run: |
# Add your deployment commands here (optional)