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

Test and Dependencies pre-valiation (branch 0.6.x) #106

Merged
merged 12 commits into from
Aug 27, 2021
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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Makefile.config
# Unit test / Coverage reports
**/*.cache
**/*.coverage
**/coverage.*
**/*.pytest_cache
**/*.tox
**/nosetests.xml
Expand Down
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---

name: Bug Report
about: Create a report to describe a problem
labels: triage/bug
assignees: cehbrecht

---

## Describe the bug

<!-- A clear and concise description of what the bug is. -->

## To Reproduce

<!--
Steps to reproduce the behavior:
1. Deploy process with payload '...'
2. Execute using payload '....'
3. Result '....'
4. Error message '...'
5. etc.
-->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

## Context

<!--
If applicable, add screenshots or drag-drop files to help explain your problem.
Also, please complete the following information.
-->

- OS: \[e.g. Linux|Windows] (if running locally)
- Browser \[e.g. chrome, safari] (if running as a service)
- Instance: \[ADES|EMS|Hybrid] and URL
- Version \["1.2.3", see `/versions` endpoint]
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---

name: Feature Request
about: Suggest an idea for this project
labels: triage/feature
assignees: cehbrecht

---

## Description

<!--

- Is your feature request related to a missing implementation or functionality?
- What is the expected solution or behaviour?
- Describe alternative approaches you have considered.

-->

## References

<!--
Provide any external references or similar issue links here.

- issue #<issue-number>
- external https://link
-->
27 changes: 27 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/pull-request-template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---

name: Pull Request
about: Create a pull request to resolve issues or add new features.

---

## Changes

<!-- Provide a summary of changes.
- ...
- ...
-->

## Features and Fixes

<!--
Add any applicable references.

- Fixes #<issue number>
- Relates to #<issue number>
-->

## Checklist

- [ ] Included fixes and related issue references in changes.
- [ ] Tests added/updated to validate fixes and/or new features.
100 changes: 100 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# run test suites

name: Tests
on:
- pull_request
- push
- release
- workflow_dispatch

jobs:
# see: https://github.com/fkirc/skip-duplicate-actions
skip_duplicate:
continue-on-error: true
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip && ! contains(github.ref, 'refs/tags') }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: "same_content_newer"
skip_after_successful_duplicate: "true"
do_not_skip: '["pull_request", "workflow_dispatch", "schedule", "release"]'

# see: https://github.com/actions/setup-python
tests:
# FIXME: https://github.com/fkirc/skip-duplicate-actions/issues/90
# disable for now because the tests never run... somehow similar config works in Magpie...
# needs: skip_duplicate
# if: ${{ needs.skip_duplicate.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow-failure }}
env:
# override make command to install directly in active python
CONDA_CMD: ""
services:
# Label used to access the service container
mongodb:
image: mongo:3.4.23 # DockerHub
ports:
- "27017:27017"
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.6", "3.7", "3.8"]
allow-failure: [false]
test-case: [test-local]
include:
# linter tests
- os: ubuntu-latest
python-version: 3.7
allow-failure: false
test-case: lint
# coverage test
- os: ubuntu-latest
python-version: 3.7
allow-failure: false
test-case: coverage
# smoke test of Docker image
- os: ubuntu-latest
python-version: None # doesn't matter which one (in docker), but match default of repo
allow-failure: false
test-case: docker-test
steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
- name: Setup Python
uses: actions/setup-python@v2
if: ${{ matrix.python-version != 'None' }}
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
if: ${{ matrix.python-version != 'None' }}
# install package and dependencies directly,
# skip sys/conda setup to use active python
run: make install develop
- name: Display Packages
if: ${{ matrix.python-version != 'None' }}
run: pip freeze
#- name: Setup Environment Variables
# uses: c-py/action-dotenv-to-setenv@v2
# with:
# env-file: ./ci/weaver.env
- name: Display Environment Variables
run: |
hash -r
env | sort
- name: Run Tests
run: make --no-keep-going ${{ matrix.test-case }}
- name: Stop Workers
if: ${{ matrix.python-version == 'None' }}
run: make docker-stop
- name: Upload coverage report
uses: codecov/codecov-action@v1
if: ${{ success() && matrix.test-case == 'coverage' }}
with:
files: ./coverage/coverage.xml
fail_ci_if_error: true
verbose: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ __pycache__
nosetests.xml
unit_tests/testdata.json
coverage/
coverage.*

# R
*.Rhistory
Expand Down
Loading