-
Notifications
You must be signed in to change notification settings - Fork 12
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
Patrick Li
committed
May 20, 2024
1 parent
c8a819a
commit 3e8e4f3
Showing
1 changed file
with
49 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,49 @@ | ||
################################################################################################## | ||
# @Date: May 9th 2024 | ||
# @Author: Patrick | ||
# @Email: [email protected] | ||
# @Description: This workflow will automatically run pytest | ||
################################################################################################## | ||
|
||
# This workflow will install Python dependencies, run tests and lint with a single version of Python | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python | ||
|
||
name: Python application | ||
|
||
on: | ||
push: | ||
branches: [ "test_workflow_main" ] | ||
pull_request: | ||
branches: [ "test_workflow_main" ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
auto-update-conda: true | ||
miniconda-version: "latest" | ||
channels: anaconda | ||
channel-priority: true | ||
|
||
- name: Create conda environment | ||
run: conda env create -f devtools/conda-envs/environment.yml | ||
|
||
- name: Activate conda environment | ||
shell: bash -l {0} | ||
run: conda activate autosolvate | ||
|
||
- name: Install additional dependencies if needed | ||
run: conda install --yes flake8 pytest | ||
|
||
- name: Test with pytest | ||
run: conda run -n autosolvate pytest |