Skip to content

Commit 3b03e05

Browse files
committed
ci: update drone, melos and pre-commit config
1 parent 8f4041d commit 3b03e05

File tree

4 files changed

+51
-32
lines changed

4 files changed

+51
-32
lines changed

.drone.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,18 @@ type: docker
33
name: default
44

55
steps:
6-
- name: test:all
7-
image: cirrusci/flutter:stable
6+
- name: quality-check
7+
image: git.wyatt-studio.fr/wyatt-foss/flutter-melos:2.9.0
88
commands:
9-
- PATH=$PATH:$HOME/.pub-cache/bin
10-
- flutter doctor
11-
- flutter pub global activate melos
12-
- melos bs
13-
- melos run test:all
9+
- melos run quality-check
10+
- melos run publish:validate
11+
- name: publish
12+
image: git.wyatt-studio.fr/wyatt-foss/flutter-melos:2.9.0
13+
commands:
14+
- melos run publish:validate
1415

1516
trigger:
1617
branch:
17-
- master
18+
- master
19+
event:
20+
- push

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/compilerla/conventional-pre-commit
3+
rev: v2.1.1
4+
hooks:
5+
- id: conventional-pre-commit
6+
stages: [commit-msg]
7+
args: [build, ci, docs, feat, fix, perf, refactor, style, test, chore]

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2022 Hugo Pointcheval
3+
Copyright (c) 2020-2023 Hugo Pointcheval
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

melos.yaml

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,26 @@
11
name: NativeCrypto
2-
# repository: https://git.pointcheval.fr/NativeCrypto/native-crypto-flutter
32

43
packages:
54
- packages/**
65

76
command:
7+
bootstrap:
8+
usePubspecOverrides: true
9+
810
version:
911
updateGitTagRefs: true
10-
linkToCommits: false # Gitea not support this
12+
linkToCommits: false # Gitea not yet supported
1113
workspaceChangelog: true
12-
# branch: master
14+
branch: master
1315

1416
scripts:
1517
lint:all:
1618
run: melos run analyze && melos run format
1719
description: Run all static analysis checks.
18-
19-
test:all:
20-
run: |
21-
melos run test --no-select
22-
description: |
23-
Run all tests available.
24-
25-
test:
26-
run: |
27-
melos exec -c 6 --fail-fast -- \
28-
"flutter test --no-pub --no-test-assets"
29-
description: Run `flutter test` for a specific package.
30-
select-package:
31-
dir-exists:
32-
- test
33-
ignore:
34-
- "*web*"
35-
- "*example*"
3620

3721
analyze:
3822
run: |
39-
melos exec -c 10 -- \
40-
flutter analyze --fatal-infos
23+
melos exec -c 1 -- flutter analyze --fatal-infos
4124
description: Run `flutter analyze` for all packages.
4225

4326
format:
@@ -51,6 +34,32 @@ scripts:
5134
clean:deep:
5235
run: git clean -x -d -f -q
5336
description: Clean things very deeply with `git clean`.
37+
38+
test:selective_unit_test:
39+
run: melos exec -- flutter test --no-pub --coverage
40+
description: Run Flutter tests for a specific package in this project.
41+
select-package:
42+
dir-exists:
43+
- test
44+
ignore:
45+
- '*example*'
46+
47+
test:all:
48+
run: melos run test:selective_unit_test --no-select
49+
description: Run all Flutter tests in this project.
50+
51+
quality-check:
52+
run: |
53+
melos clean && \
54+
melos bootstrap && \
55+
melos run test:all
56+
description: Run all targets generally expected in CI for a full local quality check.
57+
58+
publish:validate:
59+
run: melos publish --diff="origin/$DRONE_COMMIT_BRANCH...HEAD" --yes
60+
61+
# publish:
62+
# run: melos publish --diff="origin/$DRONE_COMMIT_BRANCH...HEAD" --no-dry-run --yes
5463

5564
# Additional cleanup lifecycle script, executed when `melos clean` is run.
5665
postclean: >

0 commit comments

Comments
 (0)