-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
060cddd
commit 064780f
Showing
1 changed file
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |