Cache the frontend hopefully

This commit is contained in:
Sam Therapy 2023-03-09 15:15:17 +01:00
parent c4c4dbc685
commit 4fd3c1c5df
Signed by: sam
GPG key ID: 4D8B07C18F31ACBD

View file

@ -4,40 +4,43 @@ name: pomme-pipeline
steps:
- name: cache-frontend
image: node:18
commands:
- corepack enable && pnpm config set store-dir .cache/pnpm
- pnpm -F frontend i
- name: cache-backend
image: golang:1.20
commands:
- go mod tidy && go mod vendor
volumes:
- name: 'cache'
- path: '/go'
- name: lint-frontend
image: node:18
commands:
- corepack enable
- corepack prepare pnpm@latest --activate
- pnpm -F frontend install
- corepack enable && pnpm config set store-dir .cache/pnpm
- make lint-frontend
- name: lint-backend
image: golangci/golangci-lint
commands:
- make lint-backend
- name: cache
image: golang:1.20
commands:
- go mod tidy && go mod vendor
depends_on:
- 'lint-backend'
- 'lint-frontend'
volumes:
- name: 'cache'
- path: '/go'
- name: test-frontend
image: node:18
commands:
- corepack enable && pnpm config set store-dir .cache/pnpm
- pnpm -F frontend test:unit
depends_on:
- 'cache'
- 'lint-frontend'
- name: test-backend
image: golang:1.20
commands:
- cp config.sample.yaml ./internal/api/config.yaml
- make test-backend
depends_on:
- 'cache'
- 'lint-backend'
volumes:
- name: 'cache'
- path: '/go'