diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..a0cb2a4 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,62 @@ +name: Audio Analysis Release +run-name: Audio Analysis +on: [push] +jobs: + tests: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.10' + architecture: 'x64' + + - name: Display Python version + run: python -c "import sys; print(sys.version)" + + - run: sudo apt-get update + - run: python -m pip install --upgrade pip + + - run: pip install black --upgrade + - run: find -name '*.py' | xargs black --target-version=py39 --check --diff + + docker: + runs-on: ubuntu-latest + if: startsWith(github.ref, 'refs/tags/v') + environment: + name: docker + needs: + - tests + steps: + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: cacophonyproject/audio-analysis + + - + name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - + name: Build and push + uses: docker/build-push-action@v6 + with: + file: ./Dockerfile + push: true + # tags: cacophonyproject/classifier:latest + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index eb77374..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -sudo: required -dist: bionic - -language: python -python: 3.9 - -services: - - docker - -before_script: -- pip install black - -script: -- find -name '*.py' | xargs black --target-version=py39 --check --diff - -deploy: - - provider: script - skip_cleanup: true - script: ./docker-push - on: - tags: true diff --git a/Melt/chain.py b/Melt/chain.py index 791e253..dcac268 100755 --- a/Melt/chain.py +++ b/Melt/chain.py @@ -225,4 +225,7 @@ def main(): if __name__ == "__main__": - sys.exit(main()) + try: + sys.exit(main()) + except: + sys.exit(1)