From c90b9f6840626e4e2ee85174c66518308cbcf45d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Dubas?= Date: Sat, 16 Sep 2023 01:43:26 +0000 Subject: [PATCH] feat: configure drone ci task (#1) Configure drone task to test automatically Co-authored-by: Joao P Dubas Reviewed-on: https://gitea.dubas.dev/joao.dubas/clean-architecture/pulls/1 --- .drone.yml | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..590a1bb --- /dev/null +++ b/.drone.yml @@ -0,0 +1,53 @@ +--- +kind: pipeline +type: docker +name: test + +trigger: + branch: + - main + +steps: + - name: restore cache + image: 'meltwater/drone-cache:v1.4.0' + environment: + AWS_ACCESS_KEY_ID: + from_secret: minio_user + AWS_SECRET_ACCESS_KEY: + from_secret: minio_password + settings: + archive_format: gzip + bucket: clean-architecture-cache + cache_key: '{{ .Repo.Name }}-{{ checksum ".tool-versions" }}-{{ checksum "yarn.lock" }}' + endpoint: minio:9000 + mount: + - .yarn + path_style: true + region: us-east-1 + restore: true + + - name: test + image: 'node:20.6.0-slim' + commands: + - yarn set version 3.6.3 + - yarn install + - yarn run jest + + - name: rebuild cache + image: 'meltwater/drone-cache:v1.4.0' + environment: + AWS_ACCESS_KEY_ID: + from_secret: minio_user + AWS_SECRET_ACCESS_KEY: + from_secret: minio_password + settings: + archive_format: gzip + bucket: clean-architecture-cache + cache_key: '{{ .Repo.Name }}-{{ checksum ".tool-versions" }}-{{ checksum "yarn.lock" }}' + endpoint: minio:9000 + exit_code: true + mount: + - .yarn + path_style: true + rebuild: true + region: us-east-1