Skip to content

[BI-1955] - handled NULL case in db_time_to_iso_utc #99

[BI-1955] - handled NULL case in db_time_to_iso_utc

[BI-1955] - handled NULL case in db_time_to_iso_utc #99

Workflow file for this run

on:
pull_request:
paths-ignore:
- 'docs/**'
- '**.md'
types: [opened, edited]
workflow_dispatch:
jobs:
test_docker_build:
runs-on: ubuntu-latest
steps:
- name: Free up space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Get the sgn repo
uses: actions/checkout@v2
- name: Get branch name (merge)
if: github.event_name != 'pull_request'
shell: bash
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
- name: Get branch name (pull request)
if: github.event_name == 'pull_request'
shell: bash
run: echo "branch=$(echo ${GITHUB_HEAD_REF})" >> $GITHUB_ENV
- name: Get breedbase_dockerfile
if: startsWith(env.branch, 'feature/') || startsWith(env.branch, 'bug/') || env.branch == 'develop'
uses: actions/checkout@master
with:
repository: Breeding-Insight/breedbase_dockerfile
path: breedbase_dockerfile
ref: 'develop'
submodules: 'recursive'
- name: Get breedbase_dockerfile
if: startsWith(env.branch, 'hotfix/') || env.branch == 'master'
uses: actions/checkout@master
with:
repository: Breeding-Insight/breedbase_dockerfile
path: breedbase_dockerfile
ref: 'master'
submodules: 'recursive'
- name: Get the submodules
working-directory: ./breedbase_dockerfile
run: git submodule update --init --recursive
- name: Set sgn origin
working-directory: ./breedbase_dockerfile/cxgn/sgn
run: |
git remote rm origin
git remote add origin git@github.com:Breeding-Insight/sgn.git
git remote update
- name: Checkout sgn branch
working-directory: ./breedbase_dockerfile/cxgn/sgn
run: |
git checkout -B ${{ env.branch }} origin/${{ env.branch }}
- name: Debug sgn branch
working-directory: ./breedbase_dockerfile/cxgn/sgn
run: git status
- name: Set tag
id: vars
run: echo "imageName=$(echo breedinginsight/breedbase:test_build)" >> $GITHUB_ENV
- name: Build Docker image
working-directory: ./breedbase_dockerfile
run: |
docker build . --file Dockerfile --tag ${{env.imageName}}
test_breedbase:
if: false #disabled for now, as testing script is broken
runs-on: ubuntu-latest
container:
image: breedbase/breedbase:v0.82
env:
HOME: /root
MODE: 'TESTING'
SYSTEM: 'GITACTION'
PGPASSWORD: postgres
SGN_TEST_SERVER: http://test_breedbase:3010
SGN_REMOTE_SERVER_ADDR: selenium
volumes:
- ${{ github.workspace }}:/home/production/cxgn/sgn
- ${{ github.workspace }}:/home/vagrant/cxgn/sgn
options: --network-alias test_breedbase
services:
breedbase_db:
image: postgres:12.9
env:
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
selenium:
image: selenium/standalone-firefox:3.141.59
volumes:
- ${{ github.workspace }}:/home/production/cxgn/sgn
- ${{ github.workspace }}:/home/vagrant/cxgn/sgn
options: --health-cmd="curl --silent --head http://localhost:4444 || exit 1"
steps:
- name: Checkout sgn
uses: actions/checkout@v2
- name: Run unit tests
run: prove --recurse t/unit 2>/dev/null
- name: Load/dump fixture database and build node modules
run: |
echo "--version" > ~/.proverc
perl t/test_fixture.pl --dumpupdatedfixture
rm ~/.proverc
# work around run_all_patches.pl "what the heck - no TTY??" error
# https://github.com/actions/runner/issues/241#issuecomment-842566950
shell: 'script --flush --quiet --return --command "bash --noprofile --norc -eo pipefail {0}"'
- name: Run unit_fixture tests
# need entrypoint.sh to start slurm
# --nopatch to skip running fixture and db patches (already done in previous step)
run: /entrypoint.sh --nopatch t/unit_fixture 2>/dev/null
- name: Run unit_mech tests
run: /entrypoint.sh --nopatch t/unit_mech
# selenium tests for a moment as separate folders - will change once full solgs are ready
# but anyway, it will is still fully functional for tests purpose
- name: Run selenium tests 01_list
run: /entrypoint.sh --nopatch t/selenium2/01_list 2>/dev/null
- name: Run selenium tests 02_trial
run: /entrypoint.sh --nopatch t/selenium2/02_trial 2>/dev/null
- name: Run selenium tests dataset
run: /entrypoint.sh --nopatch t/selenium2/03_dataset 2>/dev/null
- name: Run selenium tests breeders
run: /entrypoint.sh --nopatch t/selenium2/breeders 2>/dev/null
- name: Run selenium tests onto
run: /entrypoint.sh --nopatch t/selenium2/onto 2>/dev/null
- name: Run selenium tests search
run: /entrypoint.sh --nopatch t/selenium2/search 2>/dev/null
- name: Run selenium tests stock
run: /entrypoint.sh --nopatch t/selenium2/stock 2>/dev/null
- name: Run selenium tests tools
run: /entrypoint.sh --nopatch t/selenium2/tools 2>/dev/null