Skip to content

Commit 26c6be8

Browse files
authored
Migrate to common-gh-actions (#217)
* Migrate to common-gh-actions * Revert PyPI deploy b/c of permissions issues * PR feedback
1 parent 8b3fdb2 commit 26c6be8

File tree

6 files changed

+24
-153
lines changed

6 files changed

+24
-153
lines changed

.github/actions/initialize/action.yml

-31
This file was deleted.

.github/workflows/build-docs.yml

-43
This file was deleted.

.github/workflows/deploy-docs.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Build and Deploy Docs
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
jobs:
14+
deploy-docs:
15+
uses: CitrineInformatics/common-gh-actions/.github/workflows/deploy-docs.yml@v1

.github/workflows/pr-checks.yml

+4-39
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,7 @@ on:
77
- 'release/**'
88

99
jobs:
10-
check-version:
11-
name: Check version bumped
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v4
15-
- name: Initialize the environment
16-
uses: ./.github/actions/initialize
17-
- name: Check version
18-
run: python scripts/validate_version_bump.py
19-
linting:
20-
name: Run linting with flake8
21-
runs-on: ubuntu-latest
22-
steps:
23-
- uses: actions/checkout@v4
24-
- name: Initialize the environment
25-
uses: ./.github/actions/initialize
26-
- name: Lint the source directory
27-
run: flake8 gemd
28-
check-deprecated:
29-
name: Find code marked for removal in this version
30-
runs-on: ubuntu-latest
31-
steps:
32-
- uses: actions/checkout@v4
33-
- name: Initialize the environment
34-
uses: ./.github/actions/initialize
35-
- name: Deprecated check
36-
run: derp . gemd/__version__.py
37-
check-docs:
38-
name: Check docs for warnings
39-
runs-on: ubuntu-latest
40-
steps:
41-
- uses: actions/checkout@v4
42-
- name: Initialize the environment
43-
uses: ./.github/actions/initialize
44-
with:
45-
documentation: 'true'
46-
- name: Build Docs
47-
continue-on-error: true
48-
run: make -C docs/ html SPHINXOPTS='-W --keep-going'
10+
pr-checks:
11+
uses: CitrineInformatics/common-gh-actions/.github/workflows/repo-checks.yml@v1
12+
with:
13+
src: gemd

.github/workflows/pr-tests.yml

+4-39
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,7 @@ on:
77
- 'release/**'
88

99
jobs:
10-
run-tests:
11-
name: Execute unit tests
12-
runs-on: ubuntu-latest
13-
strategy:
14-
fail-fast: false
15-
matrix:
16-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17-
steps:
18-
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v4
20-
with:
21-
python-version: ${{ matrix.python-version }}
22-
- uses: actions/checkout@v4
23-
- name: Initialize the environment
24-
uses: ./.github/actions/initialize
25-
- name: Execute unit tests
26-
run: pytest --cov=gemd --cov-report term-missing:skip-covered --cov-config=tox.ini --no-cov-on-fail --cov-fail-under=100 tests/
27-
run-tests-against-latest:
28-
# These runs are intended to confirm the latest minor version of our dependencies we claim to
29-
# support don't break with our latest changes. Since they're not the versions we directly state
30-
# you should use (i.e. in requirements.txt), they arguably aren't critical, hence not blocking.
31-
name: Non-blocking - Execute unit tests against latest version of dependencies
32-
runs-on: ubuntu-latest
33-
continue-on-error: true
34-
strategy:
35-
matrix:
36-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
37-
steps:
38-
- name: Set up Python ${{ matrix.python-version }}
39-
uses: actions/setup-python@v4
40-
with:
41-
python-version: ${{ matrix.python-version }}
42-
- uses: actions/checkout@v4
43-
- name: Initialize the environment
44-
uses: ./.github/actions/initialize
45-
with:
46-
latest: 'true'
47-
- name: Execute unit tests
48-
run: pytest tests/
10+
pr-tests:
11+
uses: CitrineInformatics/common-gh-actions/.github/workflows/run-tests.yml@v1
12+
with:
13+
src: gemd

gemd/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.1.4"
1+
__version__ = "2.1.5"

0 commit comments

Comments
 (0)