Extend the integration test with a new case, testing that direct upload to the cloud works for Koji composes. Test this using a single cloud provider, specifically AWS. The test case submits a new osbuild-image build using Koji CLI, determines the image information once the build finishes and then checks that such image exists in AWS. The image is then deleted as part of the test case tear-down. The AWS credentials are now configured in the worker's configuration, if the appropriate environment variables are set. Update the SPEC file with a new test dependency and update the required osbuild-composer version.
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- "*"
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
pylint:
|
|
name: "🐍 Lint"
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: registry.fedoraproject.org/fedora:latest
|
|
steps:
|
|
|
|
- name: Install test dependencies
|
|
run: dnf -y install python3-boto3 python3-flexmock python3-httpretty python3-jsonschema python3-koji python3-pylint python3-requests
|
|
|
|
- name: Check out code
|
|
uses: actions/checkout@v3
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Analysing the code with pylint
|
|
run: |
|
|
python3 -m pylint plugins/**/*.py test/**/*.py
|
|
|
|
unit:
|
|
name: Unit tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Clone Repository"
|
|
uses: actions/checkout@v3
|
|
- name: "Run unit tests"
|
|
uses: osbuild/koji-osbuild/test@main
|
|
with:
|
|
run: |
|
|
pytest --cov-report=xml --cov=osbuild test/unit/
|
|
- name: Send coverage to codecov.io
|
|
run: bash <(curl -s https://codecov.io/bash)
|
|
|
|
shellcheck:
|
|
name: "Shellcheck"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Clone Repository"
|
|
uses: actions/checkout@v3
|
|
- name: "Run ShellCheck"
|
|
uses: ludeeus/action-shellcheck@1.1.0
|
|
with:
|
|
severity: warning
|
|
|
|
codespell:
|
|
name: "Spell check"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: codespell-project/actions-codespell@master
|
|
with:
|
|
skip: ./.git,build,LICENSE
|