Merge branch 'develop' of github.com:EBI-Metagenomics/emgapi into dev… #958
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: Testing | |
on: [push, pull_request] | |
env: | |
EMG_CONFIG: ${{ github.workspace }}/ci/configuration.yaml | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8, 3.9] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: 🐍 - Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: 💾 Start MongoDB | |
uses: supercharge/mongodb-github-action@1.3.0 | |
with: | |
mongodb-version: 4.0.6 | |
- name: ⚙️ - Checking environment | |
run: | | |
python -V | |
sudo systemctl start mysql | |
mysql --version | |
mysql -uroot -proot -e 'CREATE DATABASE emg;' | |
mysql -uroot -proot -e "SET GLOBAL sql_mode = 'STRICT_TRANS_TABLES'" | |
- name: 🔧 - Install Dependencies | |
run: | | |
pip install install .[tests] | |
pip freeze | |
- name: 🧪 - Testing | |
run: | | |
cat $EMG_CONFIG | |
pytest | |
# TODO: disabled until black formatting completed and all flake issues fixed | |
# - name: Flake | |
# continue-on-error: true | |
# run: | | |
# flake8 --version | |
# flake8 -v . | |
- name: 📮 - Slack Notification | |
uses: rtCamp/action-slack-notify@v2 | |
continue-on-error: true | |
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' | |
env: | |
SLACK_COLOR: "${{ job.status == 'success' && 'good' || 'danger' }}" | |
SLACK_USERNAME: "Github Actions API" | |
SLACK_ICON_EMOJI: ":octocat:" | |
SLACK_TITLE: "CI API results in GitHub Actions" | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
SLACK_CHANNEL: "#metagenomics-notify" | |
MSG_MINIMAL: Actions URL |