Repository navigation
Adding additional rows to study_extractions to include rows that show up in coloc_pairs #539
This file contains hidden or 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: CI/CD | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, reopened, ready_for_review, synchronize] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up Python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| cd frontend | |
| npm install --only=dev | |
| - name: Run linters | |
| run: | | |
| ruff check . | |
| cd frontend | |
| npm run lint | |
| - name: Run tests | |
| run: | | |
| cp .env.test .env | |
| export $(cat .env | xargs) | |
| mkdir -p $GWAS_DIR | |
| pytest -vs | |
| build: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Set up SSH Key | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "${{ secrets.ORACLE_SSH_PRIVATE_KEY }}" > ~/.ssh/oracle_gpmap.key | |
| chmod 600 ~/.ssh/oracle_gpmap.key | |
| ssh-keyscan -H "${{ secrets.ORACLE_SERVER }}" >> ~/.ssh/known_hosts | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v1 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Build and push API image | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: . | |
| push: true | |
| tags: | | |
| mrcieu/genotype-phenotype-api:latest | |
| mrcieu/genotype-phenotype-api:${{ github.sha }} | |
| - name: Build and push frontend image | |
| uses: docker/build-push-action@v2 | |
| with: | |
| context: frontend | |
| push: true | |
| tags: | | |
| mrcieu/genotype-phenotype-frontend:latest | |
| mrcieu/genotype-phenotype-frontend:${{ github.sha }} | |
| - name: Deploy the stack to the api server(s) | |
| env: | |
| SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
| ORACLE_SERVER: ${{ secrets.ORACLE_SERVER }} | |
| EMAIL_USERNAME: ${{ secrets.EMAIL_USERNAME }} | |
| EMAIL_PASSWORD: ${{ secrets.EMAIL_PASSWORD }} | |
| GA4_MEASUREMENT_ID: ${{ secrets.GA4_MEASUREMENT_ID }} | |
| GA4_API_SECRET: ${{ secrets.GA4_API_SECRET }} | |
| OCI_BUCKET_NAME: ${{ secrets.OCI_BUCKET_NAME }} | |
| OCI_NAMESPACE: ${{ secrets.OCI_NAMESPACE }} | |
| run: | | |
| cp .env.prod .env.backend | |
| echo "SENTRY_DSN=${SENTRY_DSN}" >> .env.backend | |
| echo "ORACLE_SERVER=${ORACLE_SERVER}" >> .env.backend | |
| echo "EMAIL_USERNAME=${EMAIL_USERNAME}" >> .env.backend | |
| echo "EMAIL_PASSWORD=${EMAIL_PASSWORD}" >> .env.backend | |
| echo "GA4_MEASUREMENT_ID=${GA4_MEASUREMENT_ID}" >> .env.backend | |
| echo "GA4_API_SECRET=${GA4_API_SECRET}" >> .env.backend | |
| echo "OCI_BUCKET_NAME=${OCI_BUCKET_NAME}" >> .env.backend | |
| echo "OCI_NAMESPACE=${OCI_NAMESPACE}" >> .env.backend | |
| cp frontend/.env.prod .env.frontend | |
| FILES="docker-swarm.yml .env.backend .env.frontend scripts/*" | |
| scp -i ~/.ssh/oracle_gpmap.key $FILES opc@${ORACLE_SERVER}:/home/opc/genotype-phenotype-api/ |