Skip to content

Commit

Permalink
WIP: add legacy unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys committed Oct 27, 2023
1 parent 060cddd commit 064780f
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/legacy_unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

env:
python.version: '3.10'
python.venv: 'testvenv'
# Following env vars when changed will "reset" the mentioned cache,
# by changing the cache file name. It is rendered as ...-v%RESET_XXX%-...
# You should go up in number, if you go down (or repeat a previous value)
# you might end up reusing a previous cache if it hasn't been deleted already.
# It applies 7 days retention policy by default.
RESET_PIP_CACHE: 0
PACKAGE_NAME: PyEDB
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
tags:
- 'v*'
branches:
- main
pull_request:
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# 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_solvers:
# The type of runner that the job will run on
runs-on: [ windows, pyedb, self-hosted ]
strategy:
matrix:
python-version: [ '3.10' ]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: "Install Git and clone project"
uses: actions/checkout@v4
if: ${{ inputs.checkout == 'true' }}

- name: "Set up Python"
uses: ansys/actions/_setup-python@main
with:
python-version: ${{ inputs.python-version }}
use-cache: ${{ inputs.use-python-cache }}

- name: "Update pip"
shell: bash
run: python -m pip install -U pip

- name: "Install Python library"
shell: bash
run: python -m pip install .

- name: "Install test requirements"
shell: bash
run: python -m pip install .[tests]

- name: "Executing legacy unit tests"
shell: bash
run: |
pytest -n 6 -m "legacy and unit"

0 comments on commit 064780f

Please sign in to comment.