-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Snowflake-Labs/conda-env-and-instructions
Add Anaconda Support
- Loading branch information
Showing
4 changed files
with
44 additions
and
35 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 |
---|---|---|
|
@@ -20,26 +20,23 @@ env: | |
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Setup Conda | ||
uses: conda-incubator/setup-[email protected] | ||
with: | ||
python-version: '3.8' | ||
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-test.txt | ||
activate-environment: snowpark | ||
environment-file: environment.yml | ||
|
||
- name: Run tests | ||
run: python -m pytest | ||
|
||
- name: Create deployment artifact | ||
run: zip -r ${{ env.ARTIFACT_NAME }} . -x .git/\* | ||
run: zip -r ${{ env.ARTIFACT_NAME }} . -x .git/\* | ||
|
||
- name: Upload artifact for deployment job | ||
uses: actions/upload-artifact@v2 | ||
|
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 |
---|---|---|
|
@@ -16,23 +16,21 @@ env: | |
SNOWSQL_SCHEMA: ${{ secrets.SNOWSQL_SCHEMA }} | ||
SNOWSQL_WAREHOUSE: ${{ secrets.SNOWSQL_WAREHOUSE }} | ||
|
||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Setup Conda | ||
uses: conda-incubator/setup-[email protected] | ||
with: | ||
python-version: '3.8' | ||
cache: 'pip' | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r requirements-test.txt | ||
activate-environment: snowpark | ||
environment-file: environment.yml | ||
|
||
- name: Run tests | ||
run: python -m pytest | ||
|
@@ -42,18 +40,14 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
- name: Setup Conda | ||
uses: conda-incubator/setup-[email protected] | ||
with: | ||
python-version: '3.8' | ||
cache: 'pip' | ||
activate-environment: snowpark | ||
environment-file: environment.yml | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install pylint | ||
run: pip install pylint | ||
|
||
- name: Analysing the code with pylint | ||
run: | | ||
pylint $(git ls-files '*.py') | ||
run: pylint $(git ls-files '*.py') |
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
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,14 @@ | ||
# Snowpark environment file | ||
# https://docs.snowflake.com/en/developer-guide/snowpark/python/setup.html | ||
|
||
name: snowpark | ||
channels: | ||
- snowflake | ||
dependencies: | ||
- python=3.8 | ||
- pip | ||
- snowflake-snowpark-python | ||
- toml | ||
- tomli | ||
- pip: | ||
- "-r requirements-test.txt" |