-
-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (42 loc) · 1.21 KB
/
gate.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
name: "gate"
on:
pull_request:
push:
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: make fonts-noto-cjk fonts-noto-cjk-extra yarnpkg
version: 1.0
- name: Cache cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/git/db/
~/.cargo/registry/index/
~/.cargo/registry/cache/
key: cargo_cache-${{ runner.os }}
- name: Install Nix
uses: cachix/install-nix-action@v30
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: CfirTsabari/actions-rs-toolchain@v1
- name: Build Packages
run: |
rustup component add rustfmt
rustup component add clippy
export RUST_LOG=DEBUG
pip install pre-commit
yarnpkg global add @taplo/cli
cargo clippy -- -Dwarnings
cargo test
cargo run -- config.toml -o example/vscode_plugins.nix
cat example/vscode_plugins.nix
cd example && nix develop --build