feat: configure drone ci task (#1)
All checks were successful
continuous-integration/drone/push Build is passing

Configure drone task to test automatically

Co-authored-by: Joao P Dubas <joao.dubas@gmail.com>
Reviewed-on: #1
This commit is contained in:
João Paulo Dubas 2023-09-16 01:43:26 +00:00
parent 895305f1a3
commit c90b9f6840

53
.drone.yml Normal file
View File

@ -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