-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (46 loc) · 1.34 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Copyright 2024 Canonical Ltd.
# See LICENSE file for licensing details.
name: Tests
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-1
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
check-version:
name: Check version
runs-on: ubuntu-22.04
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install yq
run: sudo snap install yq
- name: Compare versions
run: |
APP=$(yq .name rockcraft.yaml)
ROCK_VERSION=$(yq .version rockcraft.yaml)
CHANNEL=$(yq ".parts.charmed-mysql.stage-snaps[0]" rockcraft.yaml \
| cut -c15-)
SNAP_VERSION=$(snap info $APP | grep $CHANNEL | awk -F ' ' \
'{print $2}')
if [ "$ROCK_VERSION" != "$SNAP_VERSION" ]; then
echo "VERSION MISMATCH DETECTED"
echo "Rock version: $ROCK_VERSION"
echo "SNAP version: $SNAP_VERSION"
exit 1
fi
build:
name: Build rock
uses: canonical/data-platform-workflows/.github/workflows/build_rock.yaml@v16