799 avoid image build when not needed #1040
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: Sentinel | |
on: | |
schedule: | |
# At 05:00 UTC on every day-of-week from Monday through Friday. | |
- cron: '0 5 * * 1-5' | |
push: | |
branches: | |
- master | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test-suite: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
container: ["julienpeloton/fink-ci:dev"] | |
container: | |
image: ${{ matrix.container }} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up env from container variables | |
run: | | |
echo "FINK_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
echo "JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))" >> $GITHUB_ENV | |
echo "${BINPATH}" >> $GITHUB_PATH | |
#- name: Download test data | |
# run: | | |
# cd $FINK_HOME/datasim/basic_alerts | |
# source $FINK_HOME/datasim/basic_alerts/download_ztf_alert_data.sh | |
# cd $FINK_HOME | |
- name: Download simulator | |
run: | | |
git clone https://github.com/astrolabsoftware/fink-alert-simulator.git | |
echo "FINK_ALERT_SIMULATOR=${FINK_HOME}/fink-alert-simulator/rootfs/fink" >> $GITHUB_ENV | |
- name: Download schemas | |
run: | | |
git clone https://github.com/astrolabsoftware/fink-alert-schemas.git | |
echo "FINK_SCHEMA=${FINK_HOME}/fink-alert-schemas" >> $GITHUB_ENV | |
- name: Set up env [2/2] | |
run: | | |
echo "PYTHONPATH=${FINK_HOME}:${FINK_ALERT_SIMULATOR}:${PYTHONPATH}" >> $GITHUB_ENV | |
echo "${FINK_HOME}/bin:${FINK_ALERT_SIMULATOR}/bin" >> $GITHUB_PATH | |
echo "PYTHONPATH=$SPARK_HOME/python/lib/py4j-0.10.9.7-src.zip:$PYTHONPATH" >> $GITHUB_ENV | |
- name: Check env | |
run: | | |
echo "FINK_HOME: $FINK_HOME" | |
echo "SPARK_HOME: $SPARK_HOME" | |
echo "SPARKLIB: $SPARKLIB" | |
echo "FINK_ALERT_SIMULATOR: $FINK_ALERT_SIMULATOR" | |
echo "KAFKA_HOME: $KAFKA_HOME" | |
echo "PYTHONPATH: $PYTHONPATH" | |
echo "JAVA_HOME: $JAVA_HOME" | |
echo `python -V` | |
- name: Run test suites [dev] | |
if: matrix.container == 'julienpeloton/fink-ci:dev' | |
run: | | |
# TODO: remove me | |
pip install fink-utils==0.13.11 | |
cd $USRLIBS | |
source scripts/start_services.sh --kafka-version ${KAFKA_VERSION} --hbase-version ${HBASE_VERSION} | |
cd $FINK_HOME | |
fink_test -c conf/fink.conf.dev --unit-tests --db-integration | |
- name: Run test suites [prod] | |
if: matrix.container == 'julienpeloton/fink-ci:prod' | |
run: | | |
cd $USRLIBS | |
source scripts/start_services.sh --kafka-version ${KAFKA_VERSION} --hbase-version ${HBASE_VERSION} | |
cd $FINK_HOME | |
fink_test -c conf/fink.conf.prod --unit-tests --db-integration | |
curl -s https://codecov.io/bash | bash | |
- uses: act10ns/slack@v1 | |
with: | |
status: ${{ job.status }} | |
if: always() |