summaryrefslogtreecommitdiff
path: root/.github/workflows/tests.yml
blob: 5d8236cde434ace1a997bd5b6c9c6db6b05ecbb7 (plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Test suite

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test_release:
    name: Run tests (release)
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - stable
    steps:
      - name: Checkout branch
        uses: actions/checkout@master
        with:
          submodules: true
      - name: Setup Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - name: Run tests
        uses: actions-rs/cargo@v1
        with:
          command: test
          args: --release

  tests_debug:
    name: Run tests
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - beta
          - nightly
          - 1.42.0  # Minimum supported version
    steps:
      - name: Checkout branch
        uses: actions/checkout@master
        with:
          submodules: true
      - name: Setup Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - name: Run tests
        uses: actions-rs/cargo@v1
        with:
          command: test

  test_wasm:
    name: Run wasm tests
    runs-on: ubuntu-latest
    strategy:
      matrix:
        rust:
          - stable
    steps:
      - name: Checkout branch
        uses: actions/checkout@master
        with:
          submodules: true
      - name: Setup Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - name: Install wasm-pack
        run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
      - name: Run tests
        run: wasm-pack test serde_dhall --node

  # Tests don't work because of path escaping shenanigans. I have a branch that
  # will fix that but depends on https://github.com/LukasKalbertodt/libtest-mimic/pull/4
  test_windows:
    name: Build on windows
    # name: Run tests on windows
    runs-on: windows-latest
    strategy:
      matrix:
        rust:
          - stable
    steps:
      - name: Checkout branch
        uses: actions/checkout@master
        with:
          submodules: true
      - name: Setup Rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: ${{ matrix.rust }}
          override: true
      - name: Build
        uses: actions-rs/cargo@v1
        with:
          command: build
      # - name: Run tests
      #   uses: actions-rs/cargo@v1
      #   with:
      #     command: test