-
-
Notifications
You must be signed in to change notification settings - Fork 115
91 lines (86 loc) · 2.41 KB
/
ci.yaml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Continuous integration
on:
push:
branches:
- master
tags:
- release-*
paths-ignore:
- "site/**/*"
- schemas/**/*
- util/**/*
workflow_dispatch: {}
pull_request:
branches:
- master
jobs:
auto_tag:
name: Tag Releases
if: (github.event_name == 'push' && github.ref_type == 'branch') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.WORKFLOW_PAT }}
fetch-depth: 0
- uses: tamasfe/auto-tag@v5
with:
name: tamasfe
email: me@tamasfe.dev
token: ${{ secrets.WORKFLOW_PAT }}
test:
name: Test on Rust stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
name: Test Taplo
with:
command: test
args: -p taplo
check_wasm32:
name: Check on WASM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: wasm32-unknown-unknown
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- working-directory: crates/taplo-wasm
run: cargo check --target wasm32-unknown-unknown
toml_test:
name: Run toml-test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Retrieve toml-test
run: |
wget https://github.com/BurntSushi/toml-test/releases/download/v1.1.0/toml-test-v1.1.0-linux-amd64.gz
gunzip toml-test-v1.1.0-linux-amd64.gz
chmod +x toml-test-v1.1.0-linux-amd64
- uses: actions-rs/cargo@v1
name: Build taplo-cli
with:
command: build
args: --bin taplo --no-default-features --features "rustls-tls,toml-test"
- name: Run toml-test
run: ./toml-test-v1.1.0-linux-amd64 ./target/debug/taplo -- toml-test