changed the action to use cache (#19)

Reviewed-on: #19
Co-authored-by: Alie <bizcochito@anartist.org>
Co-committed-by: Alie <bizcochito@anartist.org>
This commit is contained in:
Alie 2024-01-06 18:57:40 +00:00 committed by bizcochito
parent 478487d402
commit cf03c90c46
5 changed files with 3065 additions and 6 deletions

View File

@ -5,14 +5,18 @@ jobs:
unit-test: unit-test:
container: container:
image: docker:dind image: docker:dind
volumes:
- /usr/local/share/.cache/yarn:/usr/local/share/.cache/yarn
- /var/lib/docker/image:/var/lib/docker/image
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
steps: steps:
- name: Starting docker daemon - name: Starting docker daemon
run: docker-init -- dockerd --host=unix:///var/run/docker.sock & run: docker-init -- dockerd --host=unix:///var/run/docker.sock &
- name: Installing necessary packages - name: Installing necessary packages
run: apk add npm git curl bash run: apk add yarn git curl bash
- name: Check out repository code - name: Check out repository code
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Install project dependencies - name: Install project dependencies
run: npm install run: yarn install --frozen-lockfile --ignore-scripts
- name: Run docker-compose - name: Run docker-compose
run: docker compose down -v && docker compose run bot-api bun test run: docker compose down -v && docker compose run bot-api bun test

View File

@ -37,13 +37,12 @@ bun install
To run: To run:
```bash ```bash
docker compose up bun run dev
``` ```
For testing, remember: For testing, remember:
```bash ```bash
docker compose down -v bun run test
docker compose run bot-api bun run test
``` ```
This project was created using `bun init` in bun v1.0.13. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. This project was created using `bun init` in bun v1.0.13. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.

4
bunfig.toml Normal file
View File

@ -0,0 +1,4 @@
[install.lockfile]
# whether to save a non-Bun lockfile alongside bun.lockb
# only "yarn" is supported
print = "yarn"

View File

@ -1,5 +1,5 @@
{ {
"name": "fib-api", "name": "bot-api",
"module": "index.ts", "module": "index.ts",
"type": "module", "type": "module",
"devDependencies": { "devDependencies": {

3052
yarn.lock Normal file

File diff suppressed because it is too large Load Diff