Skip to content

XpiritBV/github-actions-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

This repo's is created as extra labs for the GitHub Actions Training for the Actions Certification Exam by Xebia. You can find the trainings here: xebia.com/academy. With the labs in this repo (check the labs folder) you can practice and get hands-on for the exam to really let the information from the training sync in. Knowing where certain things in the UI are located, and how to solve an example question from real world experience is a great way to prepare for the exam.

Labs

Here is an overview of the labs:

  • Lab 1: Create a workflow that comments on an issue
    • Creating an issue comment using the GitHub CLI
    • Creating an issue comment using the actions/github-script@v6 action
    • Creating an issue comment only when the issue is labeled with bug
    • Using notifications effectively
  • Lab 2: Create a CI workflow
    • Create a CI workflow that runs on every push to repo
    • Execute the CI steps for the application in this repository
    • Implement best practices for GitHub Actions
      • Use SHA hashes for the actions you use
      • Use the actions/cache action to cache dependencies
      • Specify the node version to use
      • Specify a matrix job to run the CI steps for multiple versions of node
      • Show the test results from the unit tests in the GitHub UI
    • Upload a Docker image to GitHub Packages (Container Registry)
    • Create a release for the repository

Application to work with

The application in this repo is a simple Node.js application that provides a CRUD interface for maintaining a list of TODO items. It is designed to run in GitHub Codespaces.

Getting Started

To get started, you need to have a GitHub account and access to GitHub Codespaces.

  1. Fork this repository to your own GitHub account.
  2. Open this repository in GitHub Codespaces. This will create a new Codespace and start the environment as specified in the .devcontainer/devcontainer.json file.
  3. Once the Codespace is ready, open a terminal and navigate to the project root directory.
  4. Install the project dependencies by running npm install.
  5. Start the application by running npm start.

The application will start and listen on port 3000. You can access the application by opening a new browser tab and navigating to localhost:3000.

Running Tests

This project includes unit tests for the TodoController and TodoModel classes. To run the tests, use the following command:

npm test

Contributing

Contributions are welcome. Please submit a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

All sorts of excersizes to learn about GitHub Actions

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published