Skip to content

Bump version

Bump version #2230

Workflow file for this run

name: Run unit and functional test
on:
pull_request:
push:
branches: [main]
jobs:
run-unit-and-functional-test:
# Version Auto Bump happens when CICD just auto bump patch version
# We have decided to minimize generating work that is not necessary.
if: ${{ github.event.commits[0].author.name != 'Version Auto Bump' }}
# Since functional tests include tests that does not handle parallel runs
# For example, config_discovery test does not tolerate resources being
# destroyed, we are setting the concurrency here to only 1 active run at
# a time, other run requested will be queued.
concurrency: 'unit-and-functional-test'
runs-on: ubuntu-latest
name: Run unit test
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.9'
# Optional - x64 or x86 architecture, defaults to x64
architecture: 'x64'
- name: run-test
id: run-test
run: |
python3 -m venv env
. env/bin/activate && pip install poetry setuptools pip --upgrade && poetry install && pre-commit run -a && make test
- name: Upload coverage reports to Codecov
if: ${{ github.event.pull_request.head.repo.full_name == 'noqdev/iambic' }}
uses: codecov/codecov-action@v3
with:
files: cov_unit_tests.xml
flags: unit_tests
token: ${{secrets.CODECOV_TOKEN}}
- name: prepare all license
run: |
. env/bin/activate && pip freeze > requirements-all-license-check.txt
- name: Check python
id: license_check_report
uses: pilosus/action-pip-license-checker@v2
with:
requirements: 'requirements-all-license-check.txt'
fail: 'StrongCopyleft,NetworkCopyleft'
fails-only: true
exclude: '(?i)^(pylint|aio[-_]*).*'
- name: Print report
if: ${{ always() }}
run: echo "${{ steps.license_check_report.outputs.report }}"
- name: Configure AWS Credentials
if: ${{ github.event.pull_request.head.repo.full_name == 'noqdev/iambic' }}
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::580605962305:role/IambicHubRole
aws-region: us-east-1
- name: run-functional-test
if: ${{ github.event.pull_request.head.repo.full_name == 'noqdev/iambic' }}
id: run-functional-test
run: |
. env/bin/activate && make functional_test
- name: Upload coverage reports to Codecov
if: ${{ github.event.pull_request.head.repo.full_name == 'noqdev/iambic' }}
uses: codecov/codecov-action@v3
with:
files: cov_functional_tests.xml
flags: functional_tests
token: ${{secrets.CODECOV_TOKEN}}
- name: Upload coverage reports to Codecov
if: ${{ github.event.pull_request.head.repo.full_name == 'noqdev/iambic' }}
uses: codecov/codecov-action@v3
with:
files: cov_functional_tests_config_discovery.xml
flags: functional_tests_config_discovery
token: ${{secrets.CODECOV_TOKEN}}