Skip to content

Commit

Permalink
feat: add ci for contrib data(#236)
Browse files Browse the repository at this point in the history
* Create test-update-contribs.yml

* Fix: install in editable mode

* fix: track _data director as a part of the tests
  • Loading branch information
lwasser authored Nov 22, 2024
1 parent e65fe59 commit ac71d00
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/test-update-contribs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Update Contribs & reviewers

on:
workflow_dispatch:
schedule:
# Runs on the 1 and 15 of each month at 00:00 UTC (see https://crontab.guru)
- cron: "0 0 1,15 * *"
jobs:
run-meta:
if: github.repository_owner == 'pyopensci'
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python -m pip install --upgrade pip wheel
- name: Install pyosmeta and run update contribs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Install dev version
python -m pip install .
update-contributors
update-reviews
update-review-teams
- name: run precommit hooks
uses: pre-commit/[email protected]
continue-on-error: true
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
add-paths: |
_data/contributors.yml
_data/packages.yml
author: Leah <[email protected]>
base: main
branch: contribs
commit-message: "Update: Contributor & review file update"
delete-branch: true
title: Update contributor and review data
env:
# Custom token needed to trigger PR checks, as GITHUB_TOKEN won't
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#triggering-further-workflow-runs
GITHUB_TOKEN: ${{ secrets.PYOS_PR_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -157,4 +157,3 @@ src/pyosmeta/_version.py
*.pickle
.token
token.txt
_data/*

0 comments on commit ac71d00

Please sign in to comment.