Skip to content

feat: Trim memo and date in exports #1269

feat: Trim memo and date in exports

feat: Trim memo and date in exports #1269

Workflow file for this run

name: Continuous Integration
on:
pull_request:
types: [assigned, opened, synchronize, reopened]
jobs:
pytest:
runs-on: ubuntu-latest
environment: CI Environment
steps:
- uses: actions/checkout@v2
- name: Bring up Services and run tests
run: |
docker compose -f docker-compose-pipeline.yml build
docker compose -f docker-compose-pipeline.yml up -d
docker compose -f docker-compose-pipeline.yml exec -T api pytest tests/ --cov --cov-report=xml --cov-fail-under=93 --junit-xml=test-reports/report.xml | tee pytest-coverage.txt
echo "STATUS=$(cat pytest-coverage.txt | grep 'Required test' | awk '{ print $1 }')" >> $GITHUB_ENV
echo "FAILED=$(cat test-reports/report.xml | awk -F'=' '{print $5}' | awk -F' ' '{gsub(/"/, "", $1); print $1}')" >> $GITHUB_ENV
env:
ENCRYPTION_KEY: ${{ secrets.ENCRYPTION_KEY }}
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v3
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
if: ${{ always() && github.ref != 'refs/heads/master' }}
with:
create-new-comment: true
junitxml-path: ./test-reports/report.xml
- name: Stop Services
run: docker compose -f docker-compose-pipeline.yml down
- name: Evaluate Coverage
if: ${{ (env.STATUS == 'FAIL') || (env.FAILED > 0) }}
run: exit 1
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
if: ${{ always() && github.ref != 'refs/heads/master' }}
env:
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: pytest job status - ${{ job.status }}
SLACK_TITLE: Pytest Run Stats
SLACK_ICON_EMOJI: ":terminator:"
SLACK_USERNAME: Gandalf
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_FOOTER: ''