Repository navigation
78 lines (60 loc) · 1.95 KB
/
Copy pathci.yml
File metadata and controls
78 lines (60 loc) · 1.95 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
push:
branches: [main, master]
pull_request:
permissions:
contents: read
jobs:
validate-plugin:
name: Validate plugin
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.x"
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: go.mod
cache: true
- name: Validate manifest JSON
run: python -m json.tool manifest.json >/dev/null
- name: Install qmllint
run: "python -m pip install --require-hashes --only-binary=:all: -r tests/requirements-qmllint.txt"
- name: Run tests
env:
FEADER_REQUIRE_QMLLINT: "1"
run: python -m unittest discover -s tests -v
- name: Check installer syntax
run: bash -n scripts/install.sh scripts/backup.sh scripts/restore.sh scripts/database-tools.sh
- name: Check whitespace errors
run: git diff --check
go:
name: Build and test Go backend
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
- name: Set up Go
uses: actions/setup-go@40f1582b2485089dde7abd97c1529aa768e1baff # v5
with:
go-version-file: go.mod
cache: true
- name: Vet
run: go vet ./...
- name: Check formatting
run: |
unformatted="$(gofmt -l .)"
if [ -n "$unformatted" ]; then
echo "The following files are not gofmt'ed:"
echo "$unformatted"
exit 1
fi
- name: Test
run: go test -race ./...
- name: Build
run: go build -o /dev/null ./cmd/feader-rss-fetch