Skip to content

added unittest

added unittest #26

Workflow file for this run

name: CI/CD Pipeline

Check failure on line 1 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / CI/CD Pipeline

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml: Anchors are not currently supported. Remove the anchor 'env'
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:
pre-feature-pipeline:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install requests
- name: Run Python script
run: python3 pipeline/pipeline.py --step pre_feature_branch
env: *env
unittest:
runs-on: ubuntu-latest
steps:
- 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