20 lines
587 B
YAML
20 lines
587 B
YAML
name: Unit Tests with cargo
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
unit-test:
|
|
container:
|
|
image: rust
|
|
volumes:
|
|
- /usr/local/cargo:/usr/local/cargo:ro
|
|
steps:
|
|
- name: Installing necessary packages
|
|
run: apt update && apt install nodejs git -y
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v3
|
|
- name: Get access token from secret
|
|
run: echo -e "${{ secrets.MASTODON_SECRET }}" > mastodon-data.toml && ls
|
|
- name: Check code
|
|
run: cargo check
|
|
- name: Run tests
|
|
run: cargo test -- --test-threads=1 |