Fix: Import from collections. #216
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
# Template: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python package using Pip | |
on: | |
push: | |
branches: [ main, dev ] | |
pull_request: | |
branches: [ main, dev ] | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] | |
steps: | |
# --- INSTALLATIONS --- | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install package | |
shell: bash | |
# note: ${GITHUB_REF##*/} gives the branch name | |
run: | | |
python -m pip install "aac-datasets[${GITHUB_REF_NAME}] @ git+https://github.com/Labbeti/aac-datasets@${GITHUB_REF##*/}" | |
- name: Install soundfile for torchaudio | |
run: | | |
# For soundfile dep | |
sudo apt-get install libsndfile1 | |
# --- TESTS --- | |
- name: Compile python files | |
run: | | |
python -m compileall src | |
- name: Lint with flake8 | |
run: | | |
python -m flake8 --config .flake8 --exit-zero --show-source --statistics src | |
- name: Check format with Black | |
run: | | |
python -m black --check --diff src | |
- name: Print install info | |
run: | | |
aac-datasets-info | |
- name: Test with pytest | |
run: | | |
python -m pytest -v |