Welcome to mirror list, hosted at ThFree Co, Russian Federation.

tests.yml « workflows « .github - github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fb4f81ebb6cca7ab4d1fb9d46c532866f5a98b9d (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
name: Tests

on:
  push:
    branches: "*"
  pull_request:
    branches: "*"

jobs:
  unit_tests:
    name: Unit tests
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ ubuntu-latest, windows-latest, macos-latest ]

    steps:
    - name: Install mono (Linux)
      if: matrix.os == 'ubuntu-latest'
      run: sudo apt-get install mono-complete

    - name: Add msbuild to PATH (Windows)
      if: matrix.os == 'windows-latest'
      uses: microsoft/setup-msbuild@v1.0.2

    - name: Checkout Source
      uses: actions/checkout@v2

    - name: Install NuGet
      uses: nuget/setup-nuget@v1.0.5

    - name: Build Duplicati
      run: |
        nuget restore Duplicati.sln
        msbuild -p:Configuration=Release Duplicati.sln

    - name: Run Unit Tests (Linux)
      if: matrix.os == 'ubuntu-latest'
      run: |
        nuget install NUnit.Runners -Version 3.12.0 -OutputDirectory nunit
        mono nunit/NUnit.ConsoleRunner.3.12.0/tools/nunit3-console.exe Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Utility

    - name: Run Unit Tests (Windows)
      if: matrix.os == 'windows-latest'
      run: |
        nuget install NUnit.Runners -Version 3.12.0 -OutputDirectory nunit
        nunit/NUnit.ConsoleRunner.3.12.0/tools/nunit3-console.exe Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Utility

    - name: Run Unit Tests (macOS)
      if: matrix.os == 'macos-latest'
      run: |
        nuget install NUnit.Runners -Version 3.12.0 -OutputDirectory nunit
        mono nunit/NUnit.ConsoleRunner.3.12.0/tools/nunit3-console.exe Duplicati/UnitTest/bin/Release/Duplicati.UnitTest.dll --where:cat==Utility

  ui_tests:
    name: UI tests
    runs-on: ubuntu-latest

    # Some of these steps duplicate those in the unit_tests job above.  This
    # can be cleaned up using a composite run steps action once it supports
    # what we need (https://github.com/actions/runner/issues/646).
    steps:
    - name: Install mono
      run: sudo apt-get install mono-complete

    - name: Checkout Source
      uses: actions/checkout@v2

    - name: Install NuGet
      uses: nuget/setup-nuget@v1.0.5

    - name: Build Duplicati
      run: |
        nuget restore Duplicati.sln
        msbuild -p:Configuration=Release -p:DefineConstants=ENABLE_GTK Duplicati.sln

    - name: Set up Python
      uses: actions/setup-python@v2
      with:
        python-version: 3.x

    - name: Install dependencies
      run: |
        pip3 install selenium
        pip3 install --upgrade urllib3

    - name: Run UI tests
      run: |
        cp -r Duplicati/Server/webroot Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Release/webroot
        mono Duplicati/GUI/Duplicati.GUI.TrayIcon/bin/Release/Duplicati.Server.exe &
        python3 guiTests/guiTest.py