Skip to content

Commit

Permalink
Use reusable workflows (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlcsaposs-canonical authored Feb 29, 2024
1 parent 91c63a6 commit 86e5804
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 81 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/build.yaml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
name: Tests

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tox
run: pipx install tox
- name: Run linters
run: tox run -e lint

build:
name: Build snap
uses: canonical/data-platform-workflows/.github/workflows/[email protected]

smoke:
name: Smoke test snap
runs-on: ubuntu-latest
timeout-minutes: 5
needs:
- lint
- build
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install tox
run: pipx install tox
- name: Download snap package(s)
uses: actions/download-artifact@v4
with:
pattern: ${{ needs.build.outputs.artifact-prefix }}-*
merge-multiple: true
- name: Run tests
run: tox run -e smoke
16 changes: 0 additions & 16 deletions .github/workflows/lint.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/publish.yaml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
name: Release to Snap Store

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
push:
branches:
- 14/edge

jobs:
build:
name: Build snap
uses: canonical/data-platform-workflows/.github/workflows/[email protected]

release:
name: Release snap
needs:
- build
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
channel: 14/edge
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
secrets:
snap-store-token: ${{ secrets.SNAP_STORE_TOKEN }}
permissions:
contents: write # Needed to create GitHub release
22 changes: 0 additions & 22 deletions .github/workflows/smoke.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/sync_issue_to_jira.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
sync:
name: Sync GitHub issue to Jira
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v2
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v12
with:
jira-base-url: https://warthogs.atlassian.net
jira-project-key: DPE
Expand Down

0 comments on commit 86e5804

Please sign in to comment.