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

Update gh actions unit test #463

Merged
Merged
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
25 changes: 18 additions & 7 deletions .github/workflows/testing_and_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,30 @@ name: Testing and Validation
# Controls when the action will run.
on:
push:
branches: [ master, dev, notreal ]
branches: [ master, dev ]
pull_request:
branches: [ master, dev, notreal ]
branches: [ master, dev ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Run unit tests on Python
test_unit_ubuntu_latest:
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']


# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Install python3-venv
run: sudo apt-get install -y python3-venv
timeout-minutes: 5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Cache Python Venv
id: cache-python-venv
Expand Down Expand Up @@ -86,7 +91,6 @@ jobs:
key: dmod-ssl-setup

# Set up the SSL directory
# TODO: use more project-generic choice for email address for generated certs
- name: Setup SSL
if: steps.cache-ssl-setup.outputs.cache-hit != 'true'
run: |
Expand All @@ -95,11 +99,18 @@ jobs:
mkdir ssl/requestservice
mkdir ssl/requests
mkdir ssl/scheduler
./scripts/gen_cert.sh -d ssl/local -email robert.bartel@noaa.gov
./scripts/gen_cert.sh -d ssl/local -email dmod_gh_action@fake.gov
cp -a ssl/local/*.pem ssl/requestservice/.
cp -a ssl/local/*.pem ssl/requests/.
cp -a ssl/local/*.pem ssl/scheduler/.

- name: Echo dependency versions
run: |
. dmod_venv/bin/activate
python3 -m pip freeze
deactivate
timeout-minutes: 1

- name: Run Tests
run: ./scripts/run_tests.sh --venv dmod_venv -v -d -srv
timeout-minutes: 1
Loading