Skip to content
Snippets Groups Projects
Commit fec71488 authored by Fokke Dijkstra's avatar Fokke Dijkstra
Browse files

Included test in build_and_release and made a successful test a

dependency of the build.
The release will only be triggered by a correct tag.
parent 9dcc320d
Branches
Tags
No related merge requests found
name: Tests
on: [push, pull_request]
jobs:
pytest:
runs-on: ubuntu-20.04
strategy:
matrix:
python: ["3.6", "3.7", "3.8", "3.9"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python}}
architecture: x64
- name: Install Python packages
run: |
pip install pytest pytest-mock requests
- name: Run tests
run: pytest -v $PWD/test
name: Build RPM and add them to a release
on:
push:
branches:
- main
tags:
- 'v*'
pull_request:
branches:
- main
on: [push, pull_request]
jobs:
pytest:
runs-on: ubuntu-20.04
strategy:
matrix:
python: ["3.6", "3.7", "3.8", "3.9"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{matrix.python}}
architecture: x64
- name: Install Python packages
run: |
pip install pytest pytest-mock requests
- name: Run tests
run: pytest -v $PWD/test
build-rpms:
needs: [pytest]
runs-on: ubuntu-latest
steps:
- name: checkout
......@@ -40,7 +55,8 @@ jobs:
create-release:
needs: [build-rpms]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: checkout
uses: actions/checkout@v2
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment