Skip to content

SagiPolaczek is testing out GitHub Actions 🚀 #5

SagiPolaczek is testing out GitHub Actions 🚀

SagiPolaczek is testing out GitHub Actions 🚀 #5

name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on:
pull_request:
branches: [ "main" ]
jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
with:
options: "--check --verbose --diff --color"
src: "."
version: "22.3.0"
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- uses: py-actions/flake8@v2
with:
path: "."
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- run: pip install --upgrade pip
- run: pip install mypy==0.950
- run: python -m mypy . --show-error-codes
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: DEBUG
run: |
python --version; python3 --version; pip --version; pip3 --version
- name: Install dependencies
run: |
pip3 install -q .[examples]
- name: Test with pytest
run: |
pytest --durations=40 --cov=mammal --cov-fail-under=45 --capture=no mammal/examples/tests