Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 0.1.3 of percy #92

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/actions/setup-env/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Set up environment
description: Set up an percy environment

runs:
using: "composite"
steps:
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: ${{ inputs.python-version }}
cache: 'pip'
- name: Cache conda env
id: cache-conda
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
env:
cache-name: conda-env-cache
with:
cache: 'pip'
path: '/usr/share/miniconda/envs'
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/environment.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Create Environment
shell: bash
if: ${{ steps.cache-conda.outputs.cache-hit == false }}
# NOTE: We use `sed` to force a Python version in the `environment.yaml` file
run: |
conda update -n base -c defaults conda
source $CONDA/etc/profile.d/conda.sh
conda init bash
sed -i 's/- python >=3.*$/- python ${{ inputs.python-version }}.*/' environment.yaml
conda env create -f environment.yaml --name percy --force
conda run --name percy pip install .
35 changes: 0 additions & 35 deletions .github/workflows/build-linux.yml

This file was deleted.

63 changes: 63 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
on:
push:
branches:
- main
pull_request:

name: Test

jobs:
# NOTE: Tests run via `pre-commit`
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/setup-env
with:
python-version: "3.11"
# Executes `pre-commit` with the `make` directive to ensure all dependencies are found
- run: |
source $CONDA/bin/activate
conda activate percy
make pre-commit
test:
runs-on: ubuntu-latest
name: Test on ${{ matrix.python-version }}
strategy:
matrix:
python-version: ["3.11"] # TODO: Bump this to 3.12 when supported and drop 3.11 (covered in pre-commit)
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: ./.github/actions/setup-env
with:
python-version: ${{ matrix.python-version }}
- run: |
source $CONDA/bin/activate
conda activate percy
make test
build-recipe:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: AnacondaRecipes/percy-feedstock
path: ./feedstock
- name: Cache conda env
id: cache-conda
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
env:
cache-name: conda-env-cache
with:
path: '/usr/share/miniconda/envs'
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/environment.yml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Build package
run: |
cp -r ./feedstock/abs.yaml ./feedstock/recipe .
source $CONDA/bin/activate
conda install conda-build
conda-build -c distro-tooling .
31 changes: 0 additions & 31 deletions .github/workflows/pre-commit.yml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
Note: version releases in the 0.x.y range may introduce breaking changes.

## 0.1.3
- Limiting the project to Python >=3.11 for easier maintenance
- Fixes and improves our GitHub Actions workflows to our latest standards
- Removes the current recipe file in favor of using the feedstock as our source of truth.

## 0.1.2
- Fixes bug with reporting typing (`py.typed` was in the wrong location)
- Fixes and improves infrastructure
Expand Down
49 changes: 0 additions & 49 deletions conda.recipe/meta.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dependencies:
- isort
- make
- mypy
- python>=3.8
- python >=3.11
- pytest
- pytest-cov
- pytest-xdist
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespaces = false

[project]
name = "percy"
version = "0.1.2"
version = "0.1.3"
authors = [
{ name="Anaconda, Inc.", email="[email protected]" },
]
Expand Down
Loading