bot-mastodon-image-uploader/.gitea/workflows/01_test.yaml

21 lines
645 B
YAML
Raw Normal View History

2024-01-29 12:51:05 +00:00
name: Unit Tests with cargo
on: [push, pull_request]
jobs:
unit-test:
container:
image: rust
2024-01-29 13:06:25 +00:00
volumes:
2024-01-29 13:33:02 +00:00
- /usr/local/cargo:/workspace/fedi-image-bot/bot-mastodon-image-uploader/target:rw
2024-01-29 12:51:05 +00:00
steps:
- name: Installing necessary packages
2024-01-29 12:56:36 +00:00
run: apt update && apt install nodejs git -y
2024-01-29 12:51:05 +00:00
- name: Check out repository code
uses: actions/checkout@v3
2024-01-29 13:31:24 +00:00
- run: pwd && ls
2024-01-29 12:51:05 +00:00
- name: Get access token from secret
2024-01-29 13:25:08 +00:00
run: echo "${{ secrets.MASTODON_SECRET }}" > mastodon-data.toml
2024-01-29 12:51:05 +00:00
- name: Check code
run: cargo check
- name: Run tests
run: cargo test -- --test-threads=1