Skip to content

Commit

Permalink
added unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher Becker committed Jun 11, 2024
1 parent 59e327a commit 3100bac
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
47 changes: 28 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: CI/CD Pipeline

env: &env
GH_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
GH_COMMIT_HASH: ${{ github.event.head_commit.id }}
GH_COMMIT_LINK_URL: ${{ github.event.head_commit.url }}
GH_FULL_NAME: ${{ github.event.repository.full_name }}
GH_PROJECT_URL: ${{ github.event.repository.html_url }}
TRELLO_BOARD_ID: ${{ secrets.TRELLO_BOARD_ID }}
TRELLO_API_KEY: ${{ secrets.TRELLO_API_KEY }}
TRELLO_API_TOKEN: ${{ secrets.TRELLO_API_TOKEN }}

on:
push:
branches:
- '*'
jobs:
initial-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run script file
run: |
env
echo "${{toJSON(github.event)}}"
shell: bash

pre-feature-pipeline:
runs-on: ubuntu-latest
steps:
Expand All @@ -30,12 +30,21 @@ jobs:
pip3 install requests
- name: Run Python script
run: python3 pipeline/pipeline.py --step pre_feature_branch
env:
GH_COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
GH_COMMIT_HASH: ${{ github.event.head_commit.id }}
GH_COMMIT_LINK_URL: ${{ github.event.head_commit.url }}
GH_FULL_NAME: ${{ github.event.repository.full_name }}
GH_PROJECT_URL: ${{ github.event.repository.html_url }}
TRELLO_BOARD_ID: ${{ secrets.TRELLO_BOARD_ID }}
TRELLO_API_KEY: ${{ secrets.TRELLO_API_KEY }}
TRELLO_API_TOKEN: ${{ secrets.TRELLO_API_TOKEN }}
env: *env

unittest:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Test with pytest
run: |
pip install pytest pytest-cov
pytest tests.py --junitxml=results.xml
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-results
path: results.xml
needs: pre-feature-pipeline
1 change: 0 additions & 1 deletion pipeline/ci-github.yaml

This file was deleted.

1 change: 1 addition & 0 deletions pipeline/ci-github.yaml

0 comments on commit 3100bac

Please sign in to comment.