Giter Club home page Giter Club logo

ciforchallenge's Introduction

02_06 Challenge: Develop a CI Workflow

INTRODUCTION

It’s time for a challenge!

You’re working with a team of data scientists that are just starting out with GitHub Actions.

The team wants to add a continuous integration workflow to their GitHub repo so that all pushes to the main branch are linted using Flake8 and all tests are run using Pytest.

All code in the repo needs to use a specific version of Pandas, a popular Python library. They have code to test for the version but for some reason the test is failing.

They’d also like to find some way to make it easier to summarize the tests being run in the repo.

REQUIREMENTS

Help the team set up a continuous integration pipeline using a GitHub Actions starter workflow.

  1. Start by creating a new repo and adding the exercise files for this challenge.

  2. Use the GitHub Actions web interface to create a starter workflow.

  3. Run the workflow and observe the problems the team is referring to.

  4. Fix any errors in the code so that the tests pass successfully.

  5. Update the workflow to add a summary of the tests being run.

    1. Update the workflow so that it has permissions to create checks in the Actions interface.

    2. Update the call to pytest so that it creates a JUnit report named junit.xml.

       python -m pytest --verbose --junit-xml=junit.xml
      
    3. Add a new step that uses the JUnit Report Action from the GitHub Marketplace:

       - name: Publish Test Report
       uses: mikepenz/action-junit-report@v3
       if: success() || failure() # always run even if the previous step fails
       with:
           report_paths: '**/junit.xml'
           detailed_summary: true
           include_passed: true
      

This challenge should take about fifteen minutes to complete.

ciforchallenge's People

Contributors

lalitacloud avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.