Skip to content

Commit

Permalink
Merge pull request #464 from JrGoodle/github-actions-minimal-changes
Browse files Browse the repository at this point in the history
Add basic GitHub Action workflow
  • Loading branch information
JrGoodle committed May 7, 2020
2 parents 0cccbb4 + b96465f commit a6aba41
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
@@ -0,0 +1,30 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request events
on: [push, pull_request]

defaults:
run:
shell: bash

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
# - name: Install Clowder
# run: pip install clowder-repo
- run: script/update
- run: script/test
- run: clowder init https://github.com/jrgoodle/cats.git
working-directory: examples/cats
8 changes: 8 additions & 0 deletions src/clowder/clowder_app.py
Expand Up @@ -13,6 +13,7 @@

import clowder.cli as cmd
from clowder.error.clowder_exit import ClowderExit
from clowder.util.parallel_commands import __clowder_pool__


class ClowderApp(App):
Expand Down Expand Up @@ -86,6 +87,13 @@ def main() -> None:
import traceback
traceback.print_exc()

# Make sure mp pool is closed
try:
__clowder_pool__.close()
__clowder_pool__.join()
except: # noqa
__clowder_pool__.terminate()


if __name__ == '__main__':
freeze_support()
Expand Down

0 comments on commit a6aba41

Please sign in to comment.