Project info text and URL made configurable #601
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Functionality tests | |
on: | |
pull_request: | |
env: | |
svc_list: 'finalize inbox ingest mapper verify' | |
jobs: | |
check_changes: | |
outputs: | |
sda-auth: ${{ steps.changes.outputs.sda-auth }} | |
sda-download: ${{ steps.changes.outputs.sda-download }} | |
sda-pipeline: ${{ steps.changes.outputs.sda-pipeline }} | |
sftp-inbox: ${{ steps.changes.outputs.sftp-inbox }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
sda-auth: | |
- 'sda-auth/**' | |
sda-download: | |
- 'sda-download/**' | |
sda-pipeline: | |
- 'sda-pipeline/**' | |
sftp-inbox: | |
- 'sftp-inbox/**' | |
sda-auth: | |
needs: check_changes | |
if: needs.check_changes.outputs.sda-auth == 'true' | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: ['1.20'] | |
steps: | |
- name: Set up Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.7 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.7 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install tox tox-gh-actions | |
- name: Add oidc to /etc/hosts | |
run: | | |
sudo echo "127.0.0.1 oidc" | sudo tee -a /etc/hosts | |
- name: Start virtual infrastructure | |
run: | | |
cd sda-auth | |
GOLANG_VERSION=${{ matrix.go-version }} docker-compose -f ./dev-server/docker-compose.yml up -d --force-recreate --build | |
- name: Run unit tests | |
run: tox -e unit_tests -c sda-auth/tests/tox.ini | |
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] | |
fail-fast: false | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- 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 | |
sda-pipeline: | |
needs: check_changes | |
if: needs.check_changes.outputs.sda-pipeline == 'true' | |
name: sda-pipeline-integration-${{ matrix.storagetype }} | |
runs-on: ubuntu-latest | |
env: | |
STORAGETYPE: ${{ matrix.storagetype }} | |
strategy: | |
matrix: | |
storagetype: [s3, posix, s3notls, s3header, s3notlsheader, posixheader, sftp, sftpheader] | |
fail-fast: false | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Run setup scripts | |
run: | | |
cd sda-pipeline | |
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-pipeline | |
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 |