File: minimal.yml

package info (click to toggle)
rust-openssh 0.11.6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 436 kB
  • sloc: makefile: 2
file content (70 lines) | stat: -rw-r--r-- 2,141 bytes parent folder | download | duplicates (2)
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
on:
  push:
    branches: [master]
    paths-ignore:
      - 'build_doc.sh'
      - 'check.sh'
      - 'run_ci_tests.sh'
      - 'start_sshd.sh'
      - 'stop_sshd.sh'
  pull_request:
    paths-ignore:
      - 'build_doc.sh'
      - 'check.sh'
      - 'run_ci_tests.sh'
      - 'start_sshd.sh'
      - 'stop_sshd.sh'
name: With dependencies at minimal versions

concurrency:
  group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
  cancel-in-progress: true

env:
  # makes all the ignored tests not ignored
  RUSTFLAGS: --cfg=ci

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - name: Install toolchain
        run: |
          rustup toolchain install stable --no-self-update --profile minimal
          rustup toolchain install nightly --no-self-update --profile minimal
      - uses: actions/checkout@v4

      - name: cargo update -Zminimal-versions
        run: cargo +nightly -Zminimal-versions update
      - uses: Swatinem/rust-cache@v2
      - name: Compile tests
        run: cargo test --all-features --workspace --no-run

      - run: |
          # Wait for startup of openssh-server
          timeout 15 ./wait_for_sshd_start_up.sh
          chmod 600 .test-key
          mkdir /tmp/openssh-rs
          ssh -i .test-key -v -p 2222 -l test-user 127.0.0.1 -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile=/tmp/openssh-rs/known_hosts whoami
        name: Test ssh connectivity
      - run: |
          eval $(ssh-agent)
          echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" >> $GITHUB_ENV
          echo "SSH_AGENT_PID=$SSH_AGENT_PID" >> $GITHUB_ENV
          cat .test-key | ssh-add -
        name: Set up ssh-agent
      - name: cargo test
        run: |
          cargo test --all-features
        env:
          XDG_RUNTIME_DIR: /tmp
    services:
      openssh:
        image: linuxserver/openssh-server:amd64-latest
        ports:
          - 2222:2222
        env:
          USER_NAME: test-user
          PUBLIC_KEY: |-
            ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGzHvK2pKtSlZXP9tPYOOBb/xn0IiC9iLMS355AYUPC7
          DOCKER_MODS: linuxserver/mods:openssh-server-ssh-tunnel