diff options
author | CoprDistGit <infra@openeuler.org> | 2023-04-10 21:18:11 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-04-10 21:18:11 +0000 |
commit | 7864d30112c6e3363ca2a4f0c01d78ffa18655b1 (patch) | |
tree | 204d378525b2509de2f8b12f792f6c0dbf1ecba4 | |
parent | 996812931d5cfa6e9dcf7336ebbb7486e2e0696c (diff) |
automatic import of python-pytest-github-actions-annotate-failures
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-pytest-github-actions-annotate-failures.spec | 193 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 195 insertions, 0 deletions
@@ -0,0 +1 @@ +/pytest-github-actions-annotate-failures-0.1.8.tar.gz diff --git a/python-pytest-github-actions-annotate-failures.spec b/python-pytest-github-actions-annotate-failures.spec new file mode 100644 index 0000000..d9917ae --- /dev/null +++ b/python-pytest-github-actions-annotate-failures.spec @@ -0,0 +1,193 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pytest-github-actions-annotate-failures +Version: 0.1.8 +Release: 1 +Summary: pytest plugin to annotate failed tests with a workflow command for GitHub Actions +License: MIT +URL: https://github.com/pytest-dev/pytest-github-actions-annotate-failures +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/a1/8d/074e5702d6776ca13b87bd8c8cb3629c5af6477f5d11da6da2c948f1e683/pytest-github-actions-annotate-failures-0.1.8.tar.gz +BuildArch: noarch + +Requires: python3-pytest + +%description +# pytest-github-actions-annotate-failures +[Pytest](https://pypi.org/project/pytest/) plugin to annotate failed tests with a [workflow command for GitHub Actions](https://help.github.com/en/actions/reference/workflow-commands-for-github-actions) + +## Usage +Just install and run pytest with this plugin in your workflow. For example, + +```yaml +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 +[](https://gyazo.com/b578304465dd1b755ceb0e04692a57d9) + + +%package -n python3-pytest-github-actions-annotate-failures +Summary: pytest plugin to annotate failed tests with a workflow command for GitHub Actions +Provides: python-pytest-github-actions-annotate-failures +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pytest-github-actions-annotate-failures +# pytest-github-actions-annotate-failures +[Pytest](https://pypi.org/project/pytest/) plugin to annotate failed tests with a [workflow command for GitHub Actions](https://help.github.com/en/actions/reference/workflow-commands-for-github-actions) + +## Usage +Just install and run pytest with this plugin in your workflow. For example, + +```yaml +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 +[](https://gyazo.com/b578304465dd1b755ceb0e04692a57d9) + + +%package help +Summary: Development documents and examples for pytest-github-actions-annotate-failures +Provides: python3-pytest-github-actions-annotate-failures-doc +%description help +# pytest-github-actions-annotate-failures +[Pytest](https://pypi.org/project/pytest/) plugin to annotate failed tests with a [workflow command for GitHub Actions](https://help.github.com/en/actions/reference/workflow-commands-for-github-actions) + +## Usage +Just install and run pytest with this plugin in your workflow. For example, + +```yaml +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 +[](https://gyazo.com/b578304465dd1b755ceb0e04692a57d9) + + +%prep +%autosetup -n pytest-github-actions-annotate-failures-0.1.8 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-pytest-github-actions-annotate-failures -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.8-1 +- Package Spec generated @@ -0,0 +1 @@ +0d7127d73b64bdf7530574b1fbd4b5f2 pytest-github-actions-annotate-failures-0.1.8.tar.gz |