Coder Social home page Coder Social logo

amezin / pytest-github-actions-annotate-failures Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pytest-dev/pytest-github-actions-annotate-failures

0.0 1.0 0.0 111 KB

Pytest plugin to annotate failed tests with a workflow command for GitHub Actions

Home Page: https://pypi.org/project/pytest-github-actions-annotate-failures/

License: MIT License

Python 100.00%

pytest-github-actions-annotate-failures's Introduction

pytest-github-actions-annotate-failures

Pytest plugin to annotate failed tests with a workflow command for GitHub Actions

Usage

Just install and run pytest with this plugin in your workflow. For example,

name: test

on:
  push:

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3

    - uses: actions/setup-python@v4
      with:
        python-version: 3.7

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt

    - name: Install plugin
      run: pip install pytest-github-actions-annotate-failures

    - run: pytest

If your test is running in a Docker container, you have to install this plugin and manually set GITHUB_ACTIONS environment variable to true inside of Docker container. (For example, docker-compose run --rm -e GITHUB_ACTIONS=true app -- pytest)

If your tests are run from a subdirectory of the git repository, you have to set the PYTEST_RUN_PATH environment variable to the path of that directory relative to the repository root in order for GitHub to identify the files with errors correctly.

Screenshot

Image from Gyazo

pytest-github-actions-annotate-failures's People

Contributors

billyvg avatar danth avatar dependabot[bot] avatar edgarrmondragon avatar helpmefindaname avatar henryiii avatar michamos avatar ssbarnea avatar tenzer avatar utgwkk avatar yihuang 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.