aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/e2e.yml
blob: a81d4ae618eac082f81ce57b3ea703bfd12755c1 (plain) (blame)
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
name: End to End tests

on:
  push:
    branches: [ main ]
  pull_request:
    branches: [ main ]

env:
  CARGO_TERM_COLOR: always

jobs:
  test:
    name: Bulild generic binary and run tests on it
    runs-on: ubuntu-latest

    services:
      ssh:
        image: ghcr.io/linuxserver/openssh-server
        env:
          PUID: 1000
          PGID: 1000
          TZ: Europe/Vienna
          PASSWORD_ACCESS: true
          USER_PASSWORD: test
          USER_NAME: test
        ports:
          - 2222:2222
        options: -v ${{ github.workspace }}/target:/usr/src/zellij --name ssh
    steps:
    - uses: actions/checkout@v2
    - name: Add WASM target
      run: rustup target add wasm32-wasi
    - name: Install musl-tools
      run: sudo apt-get install -y --no-install-recommends musl-tools
    - name: Add musl target
      run: rustup target add x86_64-unknown-linux-musl
    - name: Install cargo-make
      run: cargo install --debug cargo-make
    - name: Build asset
      run: cargo make build-e2e
    - name: Restart ssh container
      # we need to do this because otherwise the volume will not be mounted
      # on the docker container, since it was created before the folder existed
      uses: docker://docker
      with:
        args: docker restart ssh
    - name: Test
      run: cargo make e2e-test