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

infrastructure refresh #214

Merged
merged 47 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
a3adda0
add dependabot and update infrastructure
bjlittle Feb 15, 2022
34169dc
add ci-locks and remove requirements duplication
bjlittle Feb 15, 2022
439201c
updated conda lock files
bjlittle Feb 15, 2022
6870c3e
turn-off cirrus-ci turn-on gha testing
bjlittle Feb 15, 2022
66ca52b
schedule ci-locks with cron
bjlittle Feb 15, 2022
1130092
update readthedocs
bjlittle Feb 15, 2022
9c232ad
pin mambaforge version
bjlittle Feb 15, 2022
c360843
mv doc to docs
bjlittle Feb 15, 2022
457ec10
turn-on osx tests for latest python version
bjlittle Feb 15, 2022
ce10343
use cibuildwheel
bjlittle Feb 16, 2022
f1b0cd9
use oldest-supported-numpy meta-package
bjlittle Feb 16, 2022
310575a
configure cibuildwheel
bjlittle Feb 16, 2022
df2a8a9
skip musllinux builds
bjlittle Feb 16, 2022
2a33c27
add linux aarch64 support
bjlittle Feb 16, 2022
abb7cd4
update job name
bjlittle Feb 16, 2022
d338574
yum update for aarch64
bjlittle Feb 16, 2022
58289cb
drop linux aarch64
bjlittle Feb 16, 2022
13de40e
add wheels build tests
bjlittle Feb 16, 2022
2dcf067
add wheel pytest
bjlittle Feb 16, 2022
8c6a26e
don't ignore pytest failures in tox
bjlittle Feb 16, 2022
2d1d49a
quote ci-locks cron
bjlittle Feb 16, 2022
9fcac83
update unit tests for py310
bjlittle Feb 16, 2022
bd236a5
purge old wheel building infrastructure
bjlittle Feb 16, 2022
dfffedd
publish ci-wheels to pypi
bjlittle Feb 16, 2022
6ec686e
add setuptools-scm-git-archive support
bjlittle Feb 16, 2022
40f95a2
update requirements
bjlittle Feb 16, 2022
d32ac57
ci-wheels get tags
bjlittle Feb 16, 2022
6162da3
before build deps
bjlittle Feb 16, 2022
b1f173e
revoke before build deps
bjlittle Feb 16, 2022
9b888ac
test pypi publish
bjlittle Feb 16, 2022
7957c1e
pypi publish test
bjlittle Feb 16, 2022
876d25d
final fix for ci-wheels pypi publish
bjlittle Feb 16, 2022
8881b27
update pre-commit hooks
bjlittle Feb 16, 2022
52fe0f1
drop black py310 (for now)
bjlittle Feb 16, 2022
0bd1f39
swap-out pypi upload test api token
bjlittle Feb 16, 2022
99e3a38
rename in pre-commit
bjlittle Feb 16, 2022
34c0bd0
drop unnecessary conda deps
bjlittle Feb 18, 2022
e8171aa
use miniforge
bjlittle Feb 22, 2022
9121e72
Update .github/workflows/ci-locks.yml
bjlittle Mar 17, 2022
e8b28f4
Update .github/workflows/ci-tests.yml
bjlittle Mar 17, 2022
cd2bb65
Update .github/workflows/ci-wheels.yml
bjlittle Mar 17, 2022
f17c21b
Update pyproject.toml
bjlittle Mar 17, 2022
80984c3
remove pytest min pin
bjlittle Mar 17, 2022
29f1fa9
review actions
bjlittle Mar 17, 2022
a94e83e
tidy pre-commit and add sort-all
bjlittle Mar 22, 2022
e90df3d
black reformat
bjlittle Mar 22, 2022
8cee80c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Mar 22, 2022
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
90 changes: 0 additions & 90 deletions .cirrus.yml

This file was deleted.

1 change: 1 addition & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Reference:
# - https://docs.github.com/en/code-security/supply-chain-security/keeping-your-dependencies-updated-automatically/keeping-your-actions-up-to-date-with-dependabot

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
labels:
- "New: Pull Request"
- "Bot"
37 changes: 0 additions & 37 deletions .github/workflows/actions/entrypoint.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .github/workflows/actions/manylinux2014_x86_64/action.yml

This file was deleted.

136 changes: 136 additions & 0 deletions .github/workflows/ci-locks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Reference:
# - https://github.com/actions/cache
# - https://github.com/actions/checkout
# - https://github.com/actions/download-artifact
# - https://github.com/actions/upload-artifact
# - https://github.com/conda-incubator/setup-miniconda

name: ci-locks

on:
workflow_dispatch:
schedule:
- cron: "3 0 * * 1"


jobs:
build-locks:
name: "Build ${{ matrix.lock }}"
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
ENV_NAME: "ci-locks"
strategy:
matrix:
lock: [py38-lock, py39-lock, py310-lock]
steps:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Environment configure"
env:
# Maximum cache period (in weeks) before forcing a cache refresh.
CACHE_WEEKS: 2
run: |
echo "CACHE_PERIOD=$(date +%Y).$(expr $(date +%U) / ${CACHE_WEEKS})" >> ${GITHUB_ENV}

- name: "Conda package cache"
uses: actions/cache@v2
env:
# Increment the build number to force a cache refresh.
CACHE_BUILD: 1
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-pkgs-${{ env.ENV_NAME }}-p${{ env.CACHE_PERIOD }}-b${{ env.CACHE_BUILD }}

- name: "Conda install"
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
channels: conda-forge,defaults
activate-environment: ${{ env.ENV_NAME }}
auto-update-conda: true
use-only-tar-bz2: true

- name: "Conda environment cache"
id: conda-env-cache
uses: actions/cache@v2
env:
# Increment the build number to force a cache refresh.
CACHE_BUILD: 1
with:
path: ${{ env.CONDA }}/envs/${{ env.ENV_NAME }}
key: ${{ runner.os }}-conda-env-${{ env.ENV_NAME }}-p${{ env.CACHE_PERIOD }}-b${{ env.CACHE_BUILD }}

- name: "Conda environment update"
if: steps.conda-env-cache.outputs.cache-hit != 'true'
run: |
conda install --name ${{ env.ENV_NAME }} tox

- name: "Conda info"
run: |
conda info
conda list

- name: "Tox cache"
uses: actions/cache@v2
env:
# Increment the build number to forece a cache refresh.
CACHE_BUILD: 1
TOX_INI: ${{ github.workspace }}/tox.ini
with:
path: ${{ github.workspace }}/.tox
key: ${{ runner.os }}-tox-${{ env.ENV_NAME }}-${{ matrix.lock }}-p${{ env.CACHE_PERIOD }}-b${{ env.CACHE_BUILD }}-${{ hashFiles(env.TOX_INI) }}

- name: "Create ${{ matrix.lock }} conda locks"
run: |
tox -e ${{ matrix.lock }} -- --platform osx-64 --platform win-64

- name: "Upload lock artifacts"
uses: actions/upload-artifact@v2
with:
name: lock-artifacts
path: ${{ github.workspace }}/requirements/locks/${{ matrix.lock }}*.txt


create-pr:
needs: build-locks
name: "Create pull-request"
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Download lock artifacts"
uses: actions/download-artifact@v2
with:
name: lock-artifacts
path: ${{ github.workspace }}/requirements/locks

- name: "Push pull-request"
id: cpr
# v3.12.1 (release date 31 Jan 2022)
uses: peter-evans/create-pull-request@f22a7da129c901513876a2380e2dae9f8e145330
with:
add-paths: ${{ github.workspace }}/requirements/locks/*.txt
commit-message: "updated conda lock files"
branch: conda-lock-auto-update
delete-branch: true
title: "[cf-units.ci] conda lock auto-update"
body: |
Conda lock files auto-updated to latest resolved environment for `cf-units` dependencies.
bjlittle marked this conversation as resolved.
Show resolved Hide resolved

### If the full suite of PR checks have not run, please close and re-open this pull request to trigger them.
labels: |
New: Pull Request
Bot

- name: "Show pull-request"
if: steps.cpr.outputs.pull-request-number != ''
run: |
echo "pull-request #${{ steps.cpr.outputs.pull-request-number }}"
echo "pull-request URL ${{ steps.cpr.outputs.pull-request-url }}"
echo "pull-request operation [${{ steps.cpr.outputs.pull-request-operation }}]"
echo "pull-request SHA ${{ steps.cpr.outputs.pull-request-head-sha }}"
106 changes: 106 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Reference:
# - https://github.com/actions/cache
# - https://github.com/actions/checkout
# - https://github.com/conda-incubator/setup-miniconda

name: ci-tests

on:
pull_request:

push:
branches-ignore:
- "conda-lock-auto-update"
- "pre-commit-ci-update-config"
- "dependabot/*"


jobs:
run-tests:
name: "Test ${{ matrix.version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
CYTHON_COVERAGE: 1
ENV_NAME: "ci-tests"
strategy:
matrix:
os: [ubuntu-latest]
version: [py38, py39, py310]
include:
- os: ubuntu-latest
platform: linux
- os: ubuntu-latest
version: py310
posargs: "--cov-report=xml --cov"
post-command: codecov
trexfeathers marked this conversation as resolved.
Show resolved Hide resolved
- version: py310
os: macos-latest
platform: osx
steps:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Environment configure"
env:
# Maximum cache period (in weeks) before forcing a cache refresh.
CACHE_WEEKS: 2
run: |
echo "CACHE_PERIOD=$(date +%Y).$(expr $(date +%U) / ${CACHE_WEEKS})" >> ${GITHUB_ENV}

- name: "Conda package cache"
uses: actions/cache@v2
env:
# Increment the build number to force a cache refresh.
CACHE_BUILD: 1
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-pkgs-${{ env.ENV_NAME }}-${{ matrix.version }}-p${{ env.CACHE_PERIOD }}-b${{ env.CACHE_BUILD }}

- name: "Conda install"
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
channels: conda-forge,defaults
activate-environment: ${{ env.ENV_NAME }}
auto-update-conda: false
use-only-tar-bz2: true

- name: "Conda environment cache"
id: conda-env-cache
uses: actions/cache@v2
env:
# Increment the build number to force a cache refresh.
CACHE_BUILD: 1
with:
path: ${{ env.CONDA }}/envs/${{ env.ENV_NAME }}
key: ${{ runner.os }}-conda-env-${{ env.ENV_NAME }}-${{ matrix.version }}-p${{ env.CACHE_PERIOD }}-b${{ env.CACHE_BUILD }}

- name: "Conda environment update"
if: steps.conda-env-cache.outputs.cache-hit != 'true'
run: |
conda install --name ${{ env.ENV_NAME }} tox

- name: "Conda info"
run: |
conda info
conda list

- name: "Tox cache"
uses: actions/cache@v2
env:
# Increment the build number to forece a cache refresh.
CACHE_BUILD: 1
TOX_INI: ${{ github.workspace }}/tox.ini
with:
path: ${{ github.workspace }}/.tox
key: ${{ runner.os }}-tox-${{ env.ENV_NAME }}-${{ matrix.version }}-p${{ env.CACHE_PERIOD }}-b${{ env.CACHE_BUILD }}-${{ hashFiles(env.TOX_INI) }}

- name: "Run ${{ matrix.os }} on ${{ matrix.version}} tests"
env:
POST_COMMAND: ${{ matrix.post-command }}
run: |
tox -e ${{ matrix.version }}-${{ matrix.platform }}-test -- ${{ matrix.posargs }}
Loading