-
Notifications
You must be signed in to change notification settings - Fork 7
95 lines (82 loc) · 2.56 KB
/
functionality.yml
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
name: Functionality tests
on:
merge_group:
pull_request:
jobs:
check_changes:
outputs:
sda-download: ${{ steps.changes.outputs.sda-download }}
sftp-inbox: ${{ steps.changes.outputs.sftp-inbox }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: changes
with:
filters: |
sda-auth:
- 'sda-auth/**'
sda-download:
- 'sda-download/**'
sftp-inbox:
- 'sftp-inbox/**'
sda-download:
needs: check_changes
if: needs.check_changes.outputs.sda-download == 'true'
name: sda-download-integration-${{ matrix.storagetype }}
runs-on: ubuntu-latest
env:
STORAGETYPE: ${{ matrix.storagetype }}
strategy:
matrix:
storagetype: [s3, posix, s3notls]
go-version: ['1.22']
fail-fast: false
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Run setup scripts
run: |
cd sda-download
ls -1 .github/integration/setup/{common,${{ matrix.storagetype }}}/*.sh 2>/dev/null | sort -t/ -k5 -n | while read -r runscript; do
echo "Executing setup script $runscript";
bash -x "$runscript";
done
- name: Run tests
run: |
cd sda-download
ls -1 .github/integration/tests/{common,${{ matrix.storagetype }}}/*.sh 2>/dev/null | sort -t/ -k5 -n | while read -r runscript; do
echo "Executing test script $runscript";
bash -x "$runscript";
done
sftp-inbox:
needs: check_changes
if: needs.check_changes.outputs.sftp-inbox == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build image
run: |
cd sda-sftp-inbox
docker build -t neicnordic/sda-inbox-sftp:latest .
- name: Start Services
run: |
cd sda-sftp-inbox/dev_utils
bash ./make_certs.sh
docker compose up certfixer
docker compose up -d
sleep 20
- name: Run test for sftp ssh connection
run: |
cd sda-sftp-inbox
chmod 700 src/test/resources/id_ed25519
sh ./dev_utils/sftp-testing-ssh.sh
- name: Run test for sftp with password
run: |
cd sda-sftp-inbox
sudo apt-get install expect -y
sh ./dev_utils/sftp-testing-pass.sh