Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Add Github Actions.

Add Github Actions. #1

Workflow file for this run

name: Build and test source distribution
on:
push:
branches: ['main']
tags: ['[0-9]+.[0-9]+.[0-9]+']
pull_request:
jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Build a source tarball
run: |
python -m pip install build
python -m build
- name: Store sdist as artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.tar.gz
test_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Download artifacts produced during the build_wheels and build_sdist jobs
uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Install package, clean local directory
run: |
rm -rf fz_td_recipe/
python -m pip install dist/*
python -m pip install pytest
- name: Run tests
run: |
pytest tests
- name: Store sdist as artifact
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.tar.gz