-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add initial GH actions * Fake a failure * Add software installation steps * Add software installation steps * Add software installation steps: Spark * Add software installation steps: Spark * Add software installation steps: Spark * Add software installation steps: use axel to speed-up * Add software installation steps: switch to single quote * Add software installation steps: switch to single quote * Add test suite * Add test suite * Update pythonpath in tests * Switch to python 3.6 * action for sonarqube * action for sonarqube * Add Slack integration * Remove travis integration * Add new linter for fink_science/ and bin/ * Remove slack integration for sonarqube (already millions of other notifications) * Exclude coverage from Sonar
- Loading branch information
1 parent
57f81f9
commit a5d992d
Showing
23 changed files
with
191 additions
and
382 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
name: Sentinel | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
install-checks: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check HBase 2.2.6 availability | ||
run: | | ||
wget --spider http://www-us.apache.org/dist/hbase/2.2.6/hbase-2.2.6-bin.tar.gz | ||
- name: Check Kafka 2.6.1 availability | ||
run: | | ||
wget --spider https://www.apache.org/dist/kafka/2.6.1/kafka_2.12-2.6.1.tgz | ||
- name: Check Spark 2.4.7 availability | ||
run: | | ||
wget --spider http://archive.apache.org/dist/spark/spark-2.4.7/spark-2.4.7-bin-hadoop2.7.tgz | ||
test-suite: | ||
needs: install-checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6] | ||
spark-version: [2.4.7] | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install add-ons | ||
run: | | ||
sudo apt-get install axel | ||
- name: Set up env [1/2] | ||
run: | | ||
echo "FINK_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV | ||
- name: Install Java 8 | ||
run: | | ||
source conf/java8_for_xenial.sh | ||
- name: Install HBase 2.2.6 | ||
run: | | ||
source conf/install_hbase.sh | ||
- name: Install Kafka 2.6.1 | ||
run: | | ||
source conf/install_kafka.sh | ||
echo "KAFKA_HOME=$FINK_HOME/kafka" >> $GITHUB_ENV | ||
- name: Install Spark 2.4.7 | ||
run: | | ||
axel -n10 --quiet https://archive.apache.org/dist/spark/spark-${{ matrix.spark-version }}/spark-${{ matrix.spark-version }}-bin-hadoop2.7.tgz | ||
tar -xf spark-${{ matrix.spark-version }}-bin-hadoop2.7.tgz | ||
echo "SPARK_HOME=$FINK_HOME/spark-${{ matrix.spark-version }}-bin-hadoop2.7" >> $GITHUB_ENV | ||
- name: Download test data | ||
run: | | ||
cd datasim | ||
source download_ztf_alert_data.sh | ||
cd .. | ||
echo "FINK_ALERT_SIMULATOR=${FINK_HOME}/fink-alert-simulator" >> $GITHUB_ENV | ||
- name: Download simulator | ||
run: | | ||
git clone https://github.com/astrolabsoftware/fink-alert-simulator.git | ||
- name: Set up env [2/2] | ||
run: | | ||
echo "SPARKLIB=${SPARK_HOME}/python:${SPARK_HOME}/python/lib/py4j-0.10.7-src.zip" >> $GITHUB_ENV | ||
echo "$HOME/.local/bin:${FINK_HOME}/bin" >> $GITHUB_PATH | ||
echo "${SPARK_HOME}/bin:${SPARK_HOME}/sbin" >> $GITHUB_PATH | ||
echo "$FINK_ALERT_SIMULATOR/bin" >> $GITHUB_PATH | ||
echo "spark.yarn.jars=${SPARK_HOME}/jars/*.jar" > ${SPARK_HOME}/conf/spark-defaults.conf | ||
- name: Install Python dependencies | ||
run: | | ||
pip install --upgrade pip setuptools wheel | ||
source ./install_python_deps.sh | ||
echo "PYTHONPATH="${SPARKLIB}:${FINK_HOME}:${FINK_ALERT_SIMULATOR}"" >> $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" | ||
- name: Run test suites | ||
run: | | ||
git fetch --unshallow --quiet | ||
fink init -c ${FINK_HOME}/conf/fink.conf.travis | ||
fink_kafka start | ||
fink_kafka --create-topic fink_outstream | ||
fink_simulator --docker -c ${FINK_HOME}/conf/fink_alert_simulator.conf | ||
fink_test | ||
bash <(curl -s https://codecov.io/bash) | ||
- uses: act10ns/slack@v1 | ||
with: | ||
status: ${{ job.status }} | ||
if: always() |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: PEP8 | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.6, 3.7] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install flake8 | ||
- name: fink-broker | ||
run: | | ||
flake8 fink_broker/*.py --count --show-source --statistics --ignore=E302,E501 | ||
- name: bin | ||
run: | | ||
flake8 bin/*.py --count --show-source --statistics --ignore=E302,E501 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: SonarQube | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
sonarcloud: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
# Disabling shallow clone is recommended for improving relevancy of reporting | ||
fetch-depth: 0 | ||
- name: SonarCloud Scan | ||
uses: sonarsource/sonarcloud-github-action@master | ||
with: | ||
args: > | ||
-Dsonar.organization=astrolabsoftware | ||
-Dsonar.projectKey=finkbroker | ||
-Dsonar.sources=fink_broker/,bin/ | ||
-Dsonar.test.exclusions=fink_broker/htmlcov,fink_broker/slackUtils.py | ||
-Dsonar.verbose=true | ||
-Dsonar.coverage.exclusions=**/** | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
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
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
Oops, something went wrong.