-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
93 additions
and
4 deletions.
There are no files selected for viewing
5 changes: 1 addition & 4 deletions
5
.github/workflows/ci.yaml → .github/workflows/pull-request.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
name: Run-Tests | ||
name: Pull Request | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
name: Release to Edge | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
lib-check: | ||
name: Static analysis of /lib for Python 3.5 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Set up Python 3.5 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.5 | ||
- name: Install dependencies | ||
run: python3 -m pip install tox | ||
- name: Run static analysis for /lib for 3.5 | ||
run: tox -vve static-lib | ||
static-analysis: | ||
name: Static analysis | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: python3 -m pip install tox | ||
- name: Run static analysis (charm) | ||
run: tox -vve static-charm | ||
- name: Run static analysis (unit tests) | ||
run: tox -vve static-unit | ||
- name: Run static analysis (integration tests) | ||
run: tox -vve static-integration | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: python3 -m pip install tox | ||
- name: Run linters | ||
run: tox -vve lint | ||
unit-test: | ||
name: Unit tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Install dependencies | ||
run: python -m pip install tox | ||
- name: Run tests | ||
run: tox -vve unit | ||
integration-test: | ||
name: Integration tests (microk8s) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup operator environment | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
provider: microk8s | ||
- name: Run alertmanger tests | ||
run: tox -vve integration | ||
- name: Run lma bundle tests | ||
run: tox -vve integration-lma | ||
release-to-charmhub: | ||
name: Release to CharmHub | ||
needs: | ||
- static-analysis | ||
- lib-check | ||
- lint | ||
- unit-test | ||
- integration-test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Select charmhub channel | ||
uses: canonical/charming-actions/[email protected] | ||
id: channel | ||
- name: Upload charm to charmhub | ||
uses: canonical/charming-actions/[email protected] | ||
with: | ||
credentials: "${{ secrets.CHARMHUB_TOKEN }}" | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
channel: "${{ steps.channel.outputs.name }}" |