DEV Community

zoharasulin
zoharasulin

Posted on

1

OSDC-Assigment9-GithubActions(CI)

In lesson 9 we learned about "Continuous Integration(CI) for GitHub projects" We learned GitHub Actions and provided examples of how to use them. The presentation included a demonstration of a simple workflow and implementation, examples of how to trigger jobs, and an overview of environment variables and repositories from @szabgab.
This links can help learn the subject:

The assignment was to find a project with tests but without continuous integration and set up a GitHub Action to run the tests.
I find intresting project universities-api-wrapper from pydigger
This steps of my work in here assigment:
1) Fork the project to be able edit it.

2) Add GitHub Actions Workflow to ci.yml. in folders i create .github/workflow.

3) Create ci.yml - this my code:

name: CI

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v2

      - name: Set up Python
        uses: actions/setup-python@v2
        with:
          python-version: 3.9  

      - name: Install dependencies
        run: pip install -r requirements.txt

      - name: Run tests
        run: pytest
Enter fullscreen mode Exit fullscreen mode

4) Validate my code yaml in yaml-validator

5) send PR that i explain to author why i create the file ci.yml.

6) To activate the workflow, you need to select it from the Actions menu and run it manually.

Update: my PR is merged:Hi @zoharasulin. Thank you! I was intending to create this at some point, so it was very helpful you to create this pull request. Much appreciated.

that's it!!
Thank you for listening,
Zohar.

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay