Skip to content

chore(deps): update actions/download-artifact action to v4 - autoclosed #47

chore(deps): update actions/download-artifact action to v4 - autoclosed

chore(deps): update actions/download-artifact action to v4 - autoclosed #47

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["main"]
jobs:
lint-report:
name: Lint report
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install tox
run: pip install tox
- name: Run tests using tox
run: tox -e lint
static-analysis:
name: Static analysis
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install tox
run: pip install tox
- name: Run tests using tox
run: tox -e static
unit-tests-with-coverage:
name: Unit tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install tox
run: pip install tox
- name: Run tests using tox
run: tox -e unit
integration-test:
name: Integration tests
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup LXD
uses: canonical/setup-lxd@main
with:
channel: 5.17/stable
- name: Setup operator environment
uses: charmed-kubernetes/actions-operator@main
with:
provider: microk8s
- name: Run integration tests
run: tox -e integration
- name: Archive Tested Charm
uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'push' }}
with:
name: tested-charm
path: .tox/**/httprequest-lego-k8s_ubuntu-22.04-amd64.charm
retention-days: 5
- name: Archive charmcraft logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: charmcraft-logs
path: /home/runner/.local/state/charmcraft/log/*.log
- name: Archive juju crashdump
if: failure()
uses: actions/upload-artifact@v3
with:
name: juju-crashdump
path: juju-crashdump-*.tar.xz
publish-charm:
name: Publish Charm
needs:
- lint-report
- static-analysis
- unit-tests-with-coverage
- integration-test
runs-on: ubuntu-22.04
if: ${{ github.event_name == 'push' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install charmcraft
run: sudo snap install charmcraft --classic
- name: Fetch Tested Charm
uses: actions/download-artifact@v4
with:
name: tested-charm
- name: Move charm in current directory
run: find ./ -name httprequest-lego-k8s_ubuntu-22.04-amd64.charm -exec mv -t ./ {} \;
- 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 }}"