IAM-224-Oauth interface implementation #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Quality Checks | ||
on: | ||
workflow_call: | ||
inputs: | ||
charm-path: | ||
type: string | ||
required: false | ||
provider: | ||
type: string | ||
description: "The provider to choose for either machine or k8s tests ('lxd' or 'microk8s')" | ||
required: true | ||
ip-range: | ||
type: string | ||
description: | | ||
The IP range in the address pool for the load balancer to use. | ||
It can be either a subnet(IP/mask) or a range (<IP1>-<IP2>) | ||
required: false | ||
default: "" | ||
secrets: | ||
CHARMHUB_TOKEN: | ||
required: false | ||
jobs: | ||
check-secret: | ||
name: Check the CHARMHUB_TOKEN secret | ||
runs-on: ubuntu-latest | ||
outputs: | ||
defined: ${{ steps.check.outputs.defined }} | ||
steps: | ||
- id: check | ||
env: | ||
CHARMHUB_TOKEN: ${{ secrets.CHARMHUB_TOKEN }} | ||
if: "${{ env.CHARMHUB_TOKEN != '' }}" | ||
run: echo "defined=true" >> $GITHUB_OUTPUT | ||
call-inclusive-naming-check: | ||
# Issues with this workflow can be addressed by adding a .wokeignore in the repository root | ||
name: Inclusive naming | ||
uses: canonical-web-and-design/Inclusive-naming/.github/workflows/woke.yaml@main | ||
with: | ||
fail-on-error: "true" | ||
lib-check: | ||
name: Check libraries | ||
runs-on: ubuntu-latest | ||
needs: | ||
- check-secret | ||
if: needs.check-secret.outputs.defined == 'true' | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 1 | ||
- name: Check charm libraries # Make sure our charm libraries are updated | ||
uses: canonical/charming-actions/[email protected] | ||
with: | ||
credentials: "${{ secrets.CHARMHUB_TOKEN }}" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
charm-path: "${{ inputs.charm-path }}" | ||
static-analysis: | ||
name: Static Analysis | ||
uses: nsklikas/observability/.github/workflows/_charm-static-analysis.yaml@main | ||
with: | ||
charm-path: "${{ inputs.charm-path }}" | ||
linting: | ||
name: Linting | ||
uses: ./.github/workflows/_charm-linting.yaml@main | ||
with: | ||
charm-path: "${{ inputs.charm-path }}" | ||
unit-test: | ||
name: Unit Tests | ||
uses: nsklikas/observability/.github/workflows/_charm-tests-unit.yaml@main | ||
with: | ||
charm-path: "${{ inputs.charm-path }}" | ||
scenario-test: | ||
name: Scenario Tests | ||
uses: nsklikas/observability/.github/workflows/_charm-tests-scenario.yaml@main | ||
with: | ||
charm-path: "${{ inputs.charm-path }}" | ||
integration-test: | ||
name: Integration Tests | ||
needs: | ||
- static-analysis | ||
- linting | ||
- unit-test | ||
- scenario-test | ||
uses: nsklikas/observability/.github/workflows/_charm-tests-integration.yaml@main | ||
with: | ||
charm-path: "${{ inputs.charm-path }}" | ||
provider: "${{ inputs.provider }}" | ||
ip-range: ${{ inputs.ip-range }} | ||
codeql: | ||
name: CodeQL analysis | ||
needs: | ||
- static-analysis | ||
- linting | ||
- unit-test | ||
uses: nsklikas/observability/.github/workflows/_charm-codeql-analysis.yml@main | ||
with: | ||
charm-path: "${{ inputs.charm-path }}" |