Skip to content

Commit 4814379

Browse files
authored
Automated Testing Fix (#18)
1 parent e1cc157 commit 4814379

File tree

5 files changed

+43
-39
lines changed

5 files changed

+43
-39
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Tests
22

33
on:
4-
release:
5-
types: [ published ]
4+
push:
5+
branches: [ main ]
66
pull_request:
77
branches: [ "**" ]
88

@@ -63,37 +63,3 @@ jobs:
6363
- name: Test Docker Image
6464
run: |
6565
docker run --rm juftin/lunchable:latest
66-
67-
version-checker:
68-
if: ${{ github.event_name == 'pull_request' }}
69-
runs-on: ubuntu-latest
70-
steps:
71-
- name: Set up Python
72-
uses: actions/setup-python@v2
73-
with:
74-
python-version: "3.9"
75-
- name: Install Dependencies
76-
run: |
77-
pip install --upgrade pip
78-
pip install packaging
79-
- name: Checkout Main Branch
80-
uses: actions/checkout@v2
81-
with:
82-
fetch-depth: 0
83-
ref: main
84-
- name: Get Version from main
85-
run: |
86-
COMPARED_VERSION="$(python setup.py --version)"
87-
echo COMPARED_VERSION="${COMPARED_VERSION}" >> ${GITHUB_ENV}
88-
- name: Checkout Current Ref
89-
uses: actions/checkout@v2
90-
with:
91-
fetch-depth: 0
92-
ref: ${{ github.ref }}
93-
- name: Get Current Version
94-
run: |
95-
CURRENT_VERSION="$(python setup.py --version)"
96-
echo CURRENT_VERSION="${CURRENT_VERSION}" >> ${GITHUB_ENV}
97-
- name: Compare Versions
98-
run: |
99-
python "${{ github.workspace }}/.github/helpers/version_check.py"

.github/workflows/version-checker.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Version Checker
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
jobs:
7+
version-checker:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Set up Python
11+
uses: actions/setup-python@v2
12+
with:
13+
python-version: "3.9"
14+
- name: Install Dependencies
15+
run: |
16+
pip install --upgrade pip
17+
pip install packaging
18+
- name: Checkout Main Branch
19+
uses: actions/checkout@v2
20+
with:
21+
fetch-depth: 0
22+
ref: main
23+
- name: Get Version from main
24+
run: |
25+
COMPARED_VERSION="$(python setup.py --version)"
26+
echo COMPARED_VERSION="${COMPARED_VERSION}" >> ${GITHUB_ENV}
27+
- name: Checkout Current Ref
28+
uses: actions/checkout@v2
29+
with:
30+
fetch-depth: 0
31+
ref: ${{ github.ref }}
32+
- name: Get Current Version
33+
run: |
34+
CURRENT_VERSION="$(python setup.py --version)"
35+
echo CURRENT_VERSION="${CURRENT_VERSION}" >> ${GITHUB_ENV}
36+
- name: Compare Versions
37+
run: |
38+
python "${{ github.workspace }}/.github/helpers/version_check.py"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[![Lunchable Version](https://img.shields.io/pypi/v/lunchable?color=blue&label=lunchable)](https://github.com/juftin/lunchable)
1111
[![PyPI](https://img.shields.io/pypi/pyversions/lunchable)](https://pypi.python.org/pypi/lunchable/)
1212
[![Docker Image Version](https://img.shields.io/docker/v/juftin/lunchable?color=blue&label=docker&logo=docker)](https://hub.docker.com/r/juftin/lunchable)
13-
[![Testing Status](https://github.com/juftin/lunchable/actions/workflows/tests.yml/badge.svg?branch=main&event=release)](https://github.com/juftin/lunchable/actions/workflows/tests.yml?query=branch%3Amain)
13+
[![Testing Status](https://github.com/juftin/lunchable/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/juftin/lunchable/actions/workflows/tests.yml?query=branch%3Amain)
1414
[![GitHub License](https://img.shields.io/github/license/juftin/lunchable?color=blue&label=License)](https://github.com/juftin/lunchable/blob/main/LICENSE)
1515
[![Documentation Status](https://readthedocs.org/projects/lunchable/badge/?version=latest)](https://lunchable.readthedocs.io/en/latest/?badge=latest)
1616

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ and extensive test coverage.
2424
.. image:: https://img.shields.io/docker/v/juftin/lunchable?color=blue&label=docker&logo=docker
2525
:target: https://hub.docker.com/r/juftin/lunchable
2626
:alt: Docker
27-
.. image:: https://github.com/juftin/lunchable/actions/workflows/tests.yml/badge.svg?branch=main&event=release
27+
.. image:: https://github.com/juftin/lunchable/actions/workflows/tests.yml/badge.svg?branch=main
2828
:target: https://github.com/juftin/lunchable/actions/workflows/tests.yml?query=branch%3Amain
2929
:alt: Testing Status
3030
.. image:: https://img.shields.io/github/license/juftin/lunchable?color=blue&label=License

lunchable/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
"""
44

55
__lunchable__ = "lunchable"
6-
__version__ = "0.1.3"
6+
__version__ = "0.1.4"

0 commit comments

Comments
 (0)