Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

add archival notice #393

add archival notice

add archival notice #393

Workflow file for this run

---
name: Integration tests
on: [pull_request]
jobs:
build:
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest]
python-version: [3.8]
runs-on: ${{ matrix.os }}
name: Container tests
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- uses: actions/checkout@v3
name: Get sources
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: network=host
- name: Set build target branch
run: |
if [[ ${{ github.event.pull_request.base.ref }} == master ]]; then
BRANCH=master
else
BRANCH=dev
fi
echo "BUILD_BRANCH=$BRANCH" >> $GITHUB_ENV
- name: Clone beacon 2
uses: actions/checkout@v3
with:
repository: 'CSCfi/beacon-2.x'
ref: 'test'
path: beacon2
- name: Download beacon 2 data
uses: carlosperate/download-file-action@v2.0.0
id: download-data
with:
file-url: 'https://drive.google.com/uc?export=download&id=1PLv5F54a5pqR_ts5fL68jtmmkuJjDxMA'
file-name: 'data.sql.gz'
location: './beacon2/deploy/db'
- name: Run beacon 2
run: |
cd beacon2/deploy
docker network create beacon-network_apps
docker-compose up -d db
sleep 30
docker-compose up -d
sleep 30
- name: Build
uses: docker/build-push-action@v4
with:
context: .
push: true
file: ./Dockerfile
tags: localhost:5000/beacon-network:latest
cache-from: localhost:5000/beacon-network:latest
cache-to: type=local,dest=/tmp/.buildx-cache
build-args: |
BRANCH=${{ env.BUILD_BRANCH }}
- name: Run beacon-network container
run: |
docker-compose -f docker-compose-test.yml up -d
sleep 30
- name: Set up external services for integration
run: ./tests/test_files/add_fixtures.sh
- name: Install integration tests dependencies
run: pip install asyncio httpx ujson
- name: Run Integration tests
run: python tests/integration/run_tests.py