ci: update drone, melos and pre-commit config
This commit is contained in:
parent
8f4041d7bf
commit
3b03e05efe
19
.drone.yml
19
.drone.yml
@ -3,15 +3,18 @@ type: docker
|
|||||||
name: default
|
name: default
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: test:all
|
- name: quality-check
|
||||||
image: cirrusci/flutter:stable
|
image: git.wyatt-studio.fr/wyatt-foss/flutter-melos:2.9.0
|
||||||
commands:
|
commands:
|
||||||
- PATH=$PATH:$HOME/.pub-cache/bin
|
- melos run quality-check
|
||||||
- flutter doctor
|
- melos run publish:validate
|
||||||
- flutter pub global activate melos
|
- name: publish
|
||||||
- melos bs
|
image: git.wyatt-studio.fr/wyatt-foss/flutter-melos:2.9.0
|
||||||
- melos run test:all
|
commands:
|
||||||
|
- melos run publish:validate
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- master
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
7
.pre-commit-config.yaml
Normal file
7
.pre-commit-config.yaml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
repos:
|
||||||
|
- repo: https://github.com/compilerla/conventional-pre-commit
|
||||||
|
rev: v2.1.1
|
||||||
|
hooks:
|
||||||
|
- id: conventional-pre-commit
|
||||||
|
stages: [commit-msg]
|
||||||
|
args: [build, ci, docs, feat, fix, perf, refactor, style, test, chore]
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2022 Hugo Pointcheval
|
Copyright (c) 2020-2023 Hugo Pointcheval
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
55
melos.yaml
55
melos.yaml
@ -1,43 +1,26 @@
|
|||||||
name: NativeCrypto
|
name: NativeCrypto
|
||||||
# repository: https://git.pointcheval.fr/NativeCrypto/native-crypto-flutter
|
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
- packages/**
|
- packages/**
|
||||||
|
|
||||||
command:
|
command:
|
||||||
|
bootstrap:
|
||||||
|
usePubspecOverrides: true
|
||||||
|
|
||||||
version:
|
version:
|
||||||
updateGitTagRefs: true
|
updateGitTagRefs: true
|
||||||
linkToCommits: false # Gitea not support this
|
linkToCommits: false # Gitea not yet supported
|
||||||
workspaceChangelog: true
|
workspaceChangelog: true
|
||||||
# branch: master
|
branch: master
|
||||||
|
|
||||||
scripts:
|
scripts:
|
||||||
lint:all:
|
lint:all:
|
||||||
run: melos run analyze && melos run format
|
run: melos run analyze && melos run format
|
||||||
description: Run all static analysis checks.
|
description: Run all static analysis checks.
|
||||||
|
|
||||||
test:all:
|
|
||||||
run: |
|
|
||||||
melos run test --no-select
|
|
||||||
description: |
|
|
||||||
Run all tests available.
|
|
||||||
|
|
||||||
test:
|
|
||||||
run: |
|
|
||||||
melos exec -c 6 --fail-fast -- \
|
|
||||||
"flutter test --no-pub --no-test-assets"
|
|
||||||
description: Run `flutter test` for a specific package.
|
|
||||||
select-package:
|
|
||||||
dir-exists:
|
|
||||||
- test
|
|
||||||
ignore:
|
|
||||||
- "*web*"
|
|
||||||
- "*example*"
|
|
||||||
|
|
||||||
analyze:
|
analyze:
|
||||||
run: |
|
run: |
|
||||||
melos exec -c 10 -- \
|
melos exec -c 1 -- flutter analyze --fatal-infos
|
||||||
flutter analyze --fatal-infos
|
|
||||||
description: Run `flutter analyze` for all packages.
|
description: Run `flutter analyze` for all packages.
|
||||||
|
|
||||||
format:
|
format:
|
||||||
@ -51,6 +34,32 @@ scripts:
|
|||||||
clean:deep:
|
clean:deep:
|
||||||
run: git clean -x -d -f -q
|
run: git clean -x -d -f -q
|
||||||
description: Clean things very deeply with `git clean`.
|
description: Clean things very deeply with `git clean`.
|
||||||
|
|
||||||
|
test:selective_unit_test:
|
||||||
|
run: melos exec -- flutter test --no-pub --coverage
|
||||||
|
description: Run Flutter tests for a specific package in this project.
|
||||||
|
select-package:
|
||||||
|
dir-exists:
|
||||||
|
- test
|
||||||
|
ignore:
|
||||||
|
- '*example*'
|
||||||
|
|
||||||
|
test:all:
|
||||||
|
run: melos run test:selective_unit_test --no-select
|
||||||
|
description: Run all Flutter tests in this project.
|
||||||
|
|
||||||
|
quality-check:
|
||||||
|
run: |
|
||||||
|
melos clean && \
|
||||||
|
melos bootstrap && \
|
||||||
|
melos run test:all
|
||||||
|
description: Run all targets generally expected in CI for a full local quality check.
|
||||||
|
|
||||||
|
publish:validate:
|
||||||
|
run: melos publish --diff="origin/$DRONE_COMMIT_BRANCH...HEAD" --yes
|
||||||
|
|
||||||
|
# publish:
|
||||||
|
# run: melos publish --diff="origin/$DRONE_COMMIT_BRANCH...HEAD" --no-dry-run --yes
|
||||||
|
|
||||||
# Additional cleanup lifecycle script, executed when `melos clean` is run.
|
# Additional cleanup lifecycle script, executed when `melos clean` is run.
|
||||||
postclean: >
|
postclean: >
|
||||||
|
Loading…
x
Reference in New Issue
Block a user