tests added
This commit is contained in:
parent
24bdf519d4
commit
ab34c83342
|
@ -4,18 +4,21 @@ on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
unit-test:
|
unit-test:
|
||||||
container:
|
container:
|
||||||
image: rust
|
image: docker:dind
|
||||||
volumes:
|
volumes:
|
||||||
- /usr/local/cargo:/workspace/fedi-image-bot/bot-mastodon-image-uploader/target:rw
|
- /data/.cache/act:/data/.cache/act
|
||||||
steps:
|
- /var/lib/docker/image:/var/lib/docker/image
|
||||||
|
- /var/lib/docker/overlay2:/var/lib/docker/overlay2
|
||||||
|
steps:
|
||||||
|
- name: Starting docker daemon
|
||||||
|
run: docker-init -- dockerd --host=unix:///var/run/docker.sock &
|
||||||
- name: Installing necessary packages
|
- name: Installing necessary packages
|
||||||
run: apt update && apt install nodejs git -y
|
run: apk add nodejs git curl bash
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- run: pwd && ls
|
|
||||||
- name: Get access token from secret
|
- name: Get access token from secret
|
||||||
run: echo "${{ secrets.MASTODON_SECRET }}" > mastodon-data.toml
|
run: echo "${{ secrets.MASTODON_SECRET }}" > mastodon-data.toml
|
||||||
- name: Check code
|
- name: Check code
|
||||||
run: cargo check
|
run: cargo check
|
||||||
- name: Run tests
|
- name: Run tests on docker
|
||||||
run: cargo test -- --test-threads=1
|
run: docker compose down -v && docker compose run bot t
|
Loading…
Reference in New Issue