Bump python-multipart from 0.0.5 to 0.0.7 #135
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 workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Datasets - CI | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
branches: | |
- master | |
- develop | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.8"] | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v2 | |
- name: Set output variables | |
id: vars | |
run: | | |
VERSION=$(python -c "import datasets; print(datasets.__version__)") | |
if [ ${{ github.ref }} = "refs/heads/master" ]; then | |
echo ::set-output name=TAG::${VERSION} | |
echo ::set-output name=COMMIT::${{ github.sha }} | |
elif [ ${{ github.ref }} = "refs/heads/develop" ]; then | |
echo ::set-output name=TAG::DEVELOP | |
echo ::set-output name=COMMIT::${{ github.sha }} | |
else | |
echo ::set-output name=TAG::${VERSION}-${{ github.event.pull_request.head.sha }} | |
echo ::set-output name=COMMIT::${{ github.event.pull_request.head.sha }} | |
fi | |
echo ::set-output name=BRANCH::${{ github.ref }} | |
- name: Code review tips | |
uses: machine-learning-apps/pr-comment@master | |
if: ${{ github.event_name == 'pull_request' && github.event.action == 'opened' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
path: CODE-REVIEW.md | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install . | |
- name: Test with pytest | |
run: | | |
pip install pytest pytest-cov | |
coverage erase | |
coverage run --branch --source=datasets -m pytest | |
coverage xml -i | |
- name: SonarCloud Scan | |
if: ${{ always() }} | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Set up QEMU | |
if: ${{ always() }} | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
if: ${{ always() }} | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
if: ${{ always() }} | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push docker image 📦 | |
if: ${{ always() }} | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
with: | |
push: true | |
tags: docker.io/platiagro/datasets:${{ steps.vars.outputs.TAG }} | |
build-args: | | |
COMMIT=${{ steps.vars.outputs.COMMIT }} | |
BRANCH=${{ steps.vars.outputs.BRANCH }} | |
- name: Image digest | |
if: ${{ always() }} | |
run: echo ${{ steps.docker_build.outputs.digest }} |