2024-01-29 12:51:05 +00:00
|
|
|
name: Unit Tests with cargo
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
unit-test:
|
|
|
|
container:
|
|
|
|
image: rust
|
|
|
|
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
|
|
|
|
- name: Get access token from secret
|
|
|
|
run: echo -e ${{ secrets.MASTODON_SECRET }} > mastodon-data.toml
|
|
|
|
- name: Check code
|
|
|
|
run: cargo check
|
|
|
|
- name: Run tests
|
|
|
|
run: cargo test -- --test-threads=1
|