Skip to content

IAM-224-Oauth interface implementation #1

IAM-224-Oauth interface implementation

IAM-224-Oauth interface implementation #1

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-start:
type: string
description: "The first IP address in the address pool for the load balancer to use"
required: false
default: 10.64.140.43
ip-range-end:
type: string
description: "The last IP address in the address pool for the load balancer to use"
required: false
default: 10.64.140.44
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: ./.github/workflows/_charm-static-analysis.yaml@main

Check failure on line 63 in .github/workflows/_charm-quality-checks.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/_charm-quality-checks.yaml

Invalid workflow file

invalid value workflow reference: cannot specify version when calling local workflows
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: ./.github/workflows/_charm-tests-unit.yaml@main
with:
charm-path: "${{ inputs.charm-path }}"
scenario-test:
name: Scenario Tests
uses: ./.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: ./.github/workflows/_charm-tests-integration.yaml@main
with:
charm-path: "${{ inputs.charm-path }}"
provider: "${{ inputs.provider }}"
ip-range-start: ${{ inputs.ip-range-start }}
ip-range-end: ${{ inputs.ip-range-end }}
codeql:
name: CodeQL analysis
needs:
- static-analysis
- linting
- unit-test
uses: ./.github/workflows/_charm-codeql-analysis.yml@main
with:
charm-path: "${{ inputs.charm-path }}"