-
Notifications
You must be signed in to change notification settings - Fork 1
64 lines (53 loc) · 1.58 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Test
permissions:
contents: write
on: [push]
env:
CARGO_TERM_COLOR: always
jobs:
rust-test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Run
run: |
cargo install neofetch
neofetch | cargo run --features="cli" > ./neofetch.svg
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: ./*.svg
npm-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: test
run: |
curl --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh -s -- -y --default-toolchain nightly
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
rustup target add wasm32-unknown-unknown
cargo binstall wasm-pack -y --force
npm i pnpm -g
cd ./ansi2
cargo test
cd ..
cd ./ansi2-wasm
pnpm i
pnpm run build
sudo apt-get install neofetch -y
neofetch | node ./bin/cli.js --format=svg --theme=vscode > neofetch.svg
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ansi2
path: ./ansi2-wasm/*.svg