Skip to content

chore(deps): update minor updates #53

chore(deps): update minor updates

chore(deps): update minor updates #53

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Specify the python versions to test
strategy:
matrix:
python-version: ["3.11"]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
# Set up the python versions
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5
with:
python-version: ${{ matrix.python-version }}
# Install poetry
- name: Install poetry and coveralls
run: >-
python -m pip install --upgrade poetry coveralls
# Setting up dependencies
- name: Install dependencies (with all extras)
run: |
poetry install --all-extras
# Runs all tests in the 'tests' directory and gets coverage
- name: Test the code
run: |
poetry run coverage run -m pytest -v
- name: mypy
run: poetry run mypy sfdmap2
# Push the coverage result to coveralls.io
- name: Run Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
if: ${{ success() }}
run: coveralls
- name: Echo tag name
run: echo "Tag is ${{ github.ref }}, Tagged is ${{ startsWith(github.ref, 'refs/tags/')}}, Python Check is ${{matrix.python-version == 3.11}}, Deploy is ${{ startsWith(github.ref, 'refs/tags/') && matrix.python-version == 3.11}}"
# Build a tarball and push to Pypi if tagged with new version
- name: Build and publish
if: ${{ startsWith(github.ref, 'refs/tags/') && success() && matrix.python-version == 3.11}}
run: |
poetry publish -n --build
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}