forked from wolsen/snap-sunbeam
-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (44 loc) · 1.17 KB
/
build-and-test.yml
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
name: Build/Test
on:
workflow_call:
outputs:
snap:
description: "Filename of the built snap artifact"
value: local-${{ jobs.build.outputs.snap }}
jobs:
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 -e pep8
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 -e py3
build:
name: Build snap
runs-on: ubuntu-latest
outputs:
snap: ${{ steps.snapcraft.outputs.snap }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build snap locally
uses: snapcore/action-build@v1
id: snapcraft
- name: Upload locally built snap artifact
uses: actions/upload-artifact@v3
with:
name: local-${{ steps.snapcraft.outputs.snap }}
path: ${{ steps.snapcraft.outputs.snap }}