Skip to content

Commit

Permalink
Fix bug in Github Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bonicim committed Sep 8, 2022
1 parent 771e556 commit 1589b2b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
branches: [master, develop, release/**]
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
inputs:
triggeredBy:
description: 'Name of team member who is manually triggering this workflow'
required: true

defaults:
run:
Expand All @@ -21,23 +26,28 @@ jobs:

strategy:
matrix:
os: [ubuntu-20.04, macos-12, windows-2022]
python: ['3.7']
os: [ubuntu-22.04, macos-12, windows-2022]
python: ['3.7', '3.8', '3.9', '3.10']

runs-on: ${{ matrix.os }}

steps:

- run: |
echo "This workflow was triggered by: $TRIGGER_PERSON"
env:
TRIGGER_PERSON: ${{ inputs.triggeredBy }}
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."

- name: Checkout
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python }}

# https://github.com/pre-commit/action
- name: Run pre-commit hooks
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,3 +232,23 @@ License
-------

Released under the 3-Clause BSD license (see License.rst)


Continuous Integration/Continuous Deployment
--------------------------------------------

This project runs Continuous Integration (CI) using GitHub Actions. Normally, CI runs
on pull requests, pushes to certain branches, and other events.

Maintainers of the GitHub repository can manually trigger CI using [GitHub CLI](https://cli.github.com/). See instructions below on how to manually trigger CI on GitHub Actions:

```commandline
# login to Github
gh auth login --with-token < ~/.ssh/tokens/<path to my personal access token>
# Trigger CI
gh workflow run ci.yml --repo pnnl/HyperNetX --ref <name of branch that you want CI to run on> --field triggeredBy="<Your name>"
# Get the status of the workflow
gh run list --workflow=ci.yml --repo pnnl/HyperNetX
```

0 comments on commit 1589b2b

Please sign in to comment.