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

Fix CI to fail and run appropriately #116

Merged
merged 21 commits into from
May 27, 2024
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
10 changes: 6 additions & 4 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ defaults:
env:
ARTIFACT_NAME: demo-mdakit-repos
OUTPUT_DIRECTORY: /home/runner/example_outputs
OUTPUT_COOKIE_SUBDIRECTORY: TestMDAKit_with_host_MDAnalysis_condaforge-deps_and_ReadTheDocs/mdakit-cookie
GH_USER: github-actions
GH_EMAIL: "[email protected]"
GH_REPOSITORY: "github.com/${{ github.repository }}.git"
Expand Down Expand Up @@ -60,25 +61,26 @@ jobs:
run: |
# --keep-test-outputs also saves the generated repositories
if [[ ${{ matrix.os }} == "ubuntu-latest" ]] ; then
PYTEST_FLAGS="--keep-test-outputs $OUTPUT_DIRECTORY"
PYTEST_FLAGS="--keep-test-outputs ${{ env.OUTPUT_DIRECTORY }}"
else
PYTEST_FLAGS=""
fi
echo "PYTEST_FLAGS=${PYTEST_FLAGS}"

pytest tests/ $PYTEST_FLAGS

- name: List directories
- name: check cookie CI presence
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
ls -la ${{ env.OUTPUT_DIRECTORY }}/TestMDAKit_with_host_MDAnalysis_condaforge-deps_and_ReadTheDocs/mdakit-cookie
ls -la ${{ env.OUTPUT_DIRECTORY }}/
ls -la ${{ env.OUTPUT_DIRECTORY }}/${{ env.OUTPUT_COOKIE_SUBDIRECTORY }}/

- name: Run cookie CI
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: ./.github/actions/run-cookie-ci
with:
source-directory: ${{ env.OUTPUT_DIRECTORY }}/${{ env.OUTPUT_COOKIE_SUBDIRECTORY }}
CODECOV_TOKEN: ${{ secrets.COOKIE_CODECOV_TOKEN }}
source-directory: ${{ env.OUTPUT_DIRECTORY }}/TestMDAKit_with_host_MDAnalysis_condaforge-deps_and_ReadTheDocs/mdakit-cookie

- name: Upload artifact
if: ${{ matrix.os == 'ubuntu-latest' && matrix.last-n-minor-python-release == 0 }}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def test_write_outputs(
kitter = CookiecutterMDAKit(
project_name=project_name,
repo_name="mdakit-cookie",
package_name="mdakit_cookie",
package_name="cookiekit",
github_username="test-user-account",
github_host_account=github_host_account,
description=description,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,15 @@ jobs:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"]
mdanalysis-version: ["latest", "develop"]
python-version: ["3.10", "3.11", "3.12"]
exclude:
# Entries here exclude particular combinations of the matrix
# Edit or remove as particular combinations come into or out of date
# Below we exclude runs with the latest release and Python 3.12
- mdanalysis-version: "latest"
python-version: "3.12"


steps:
- uses: actions/checkout@v4

Expand Down