name: Test
permissions:
contents: write
on: [push]
env:
CARGO_TERM_COLOR: always
defaults:
run:
shell: bash --noprofile --norc -CeEuo pipefail {0}
jobs:
rust-test:
strategy:
matrix:
os: [
ubuntu-24.04,
windows-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: cargo test
run: |
cargo test
- name: cargo run
run: |
echo $PATH
cargo run -- https://github.com/ahaoboy/mujs-build
cargo run -- https://github.com/ahaoboy/neofetch
cargo run -- https://github.com/axodotdev/cargo-dist
cargo run -- https://github.com/denoland/deno
cargo run -- https://github.com/ahaoboy/easy-install/releases/latest/download/ffmpeg.json
cargo run -- ./dist-manifest/zig.json
cargo run -- ./dist-manifest/FiraCode.json
cargo run -- ./dist-manifest/JetBrainsMono.json
cargo run -- ./dist-manifest/llrt.json
cargo run -- ./dist-manifest/alist.json
cargo run -- ./dist-manifest/bun.json
cargo run -- ./dist-manifest/fnm.json
cargo run -- ./dist-manifest/ryubing.json
cargo run -- ./dist-manifest/7z.json
cargo run -- starship
echo $PATH
- name: install on ubuntu
if: matrix.os == 'ubuntu-24.04'
run: |
cargo run -- https://github.com/ahaoboy/jsc-build
cargo run -- https://github.com/ahaoboy/spidermonkey-build
cargo run -- https://github.com/ahaoboy/v8-build
cargo run -- ./dist-manifest/ffmpeg.json
- name: install on windows
if: matrix.os == 'windows-latest'
run: |
cargo run -- ./dist-manifest/ffmpeg.json
cargo run -- ./dist-manifest/screentogif.json
cargo run -- ./dist-manifest/wiztree.json
cargo run -- ./dist-manifest/mpv-easy.json
cargo run -- ./dist-manifest/mpv.json
- name: add path
if: matrix.os == 'windows-latest'
shell: powershell
run: |
echo "PATH=$env:PATH;C:\Users\runneradmin\easy-install" >> $env:GITHUB_ENV
- name: test which on windows
if: matrix.os == 'windows-latest'
shell: powershell
run: |
get-command mujs
get-command neofetch
get-command dist
get-command deno
get-command ffmpeg
get-command zig
get-command llrt
get-command alist
get-command bun
get-command fnm
get-command 7z
get-command starship
get-command ScreenToGif
- name: test which on ubuntu
if: matrix.os == 'ubuntu-24.04'
run: |
which jsc
which js
which d8
which deno
which ffmpeg
which zig
which llrt
which alist
which bun
which fnm
which 7z
which starship
echo "typeof globalThis.print>'u'&&(globalThis.print=console.log);print(2);" >> test.js
d8 ./test.js
js ./test.js
jsc ./test.js