approx-ml / approx

Automatic quantization library
https://approx-ml.github.io/approx/
Apache License 2.0
11 stars 1 forks source link

Setup CI #8

Closed ma7dev closed 2 years ago

ma7dev commented 2 years ago

Examples

ci.yml

name: Run tests

on:
  push:
    branches:
      - main
      - develop
      - dev/*
    paths-ignore:
      - 'docs/**'
      - '**.md'
      - README.md
  pull_request:
    types:
      - opened
      - reopened
    branches:
      - main
      - develop
      - dev/*
    paths-ignore:
      - 'docs/**'
      - '**.md'
      - README.md

jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
      ...
      - name: Checkout repository
        uses: https://github.com/actions/checkout/tree/v2v2
      - name: Run tests
        run: |
          echo "Running tests..."
          python -m pytest tests

publish.yml

name: publish_package_to_pypi

on:
  push:
    branches: ['main']

jobs:
  publish:
    runs-on: ubuntu-latest
    steps:
      ...
      - name: Publish Package
        run: |
          echo "Building package..."
          python -m poetry build
          echo "Publish package..."
          python -m poetry publish --username=${{ secrets.PYPIUSERNAME }} --password=${{ secrets.PYPIPASSWORD }}