-
Notifications
You must be signed in to change notification settings - Fork 55
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
Showing
1 changed file
with
87 additions
and
86 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 |
---|---|---|
|
@@ -84,107 +84,108 @@ jobs: | |
file: ./coverage.xml | ||
fail_ci_if_error: true | ||
|
||
live-tests: | ||
name: Live Tests | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# live-tests: | ||
# name: Live Tests | ||
# needs: tests | ||
# runs-on: ubuntu-latest | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
cache: "pip" # caching pip dependencies | ||
cache-dependency-path: | | ||
pyproject.toml | ||
requirements-dev.txt | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-dev.txt | ||
# - name: Set up Python | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: 3.8 | ||
# cache: "pip" # caching pip dependencies | ||
# cache-dependency-path: | | ||
# pyproject.toml | ||
# requirements-dev.txt | ||
|
||
- name: Set up Cloud SDK | ||
uses: google-github-actions/[email protected] | ||
with: | ||
project_id: ${{ secrets.GCP_PROJECT_ID }} | ||
service_account_key: ${{ secrets.GCP_SA_KEY }} | ||
export_default_credentials: true | ||
# - name: Install dependencies | ||
# run: | | ||
# python -m pip install --upgrade pip | ||
# pip install -r requirements-dev.txt | ||
|
||
- name: Run live tests | ||
run: | | ||
make test-live-cloud | ||
env: | ||
LIVE_AZURE_CONTAINER: ${{ secrets.LIVE_AZURE_CONTAINER }} | ||
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} | ||
LIVE_GS_BUCKET: ${{ secrets.LIVE_GS_BUCKET }} | ||
LIVE_S3_BUCKET: ${{ secrets.LIVE_S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
CUSTOM_S3_BUCKET: ${{secrets.CUSTOM_S3_BUCKET}} | ||
CUSTOM_S3_KEY_ID: ${{secrets.CUSTOM_S3_KEY_ID}} | ||
CUSTOM_S3_SECRET_KEY: ${{secrets.CUSTOM_S3_SECRET_KEY}} | ||
CUSTOM_S3_ENDPOINT: ${{secrets.CUSTOM_S3_ENDPOINT}} | ||
# - name: Set up Cloud SDK | ||
# uses: google-github-actions/[email protected] | ||
# with: | ||
# project_id: ${{ secrets.GCP_PROJECT_ID }} | ||
# service_account_key: ${{ secrets.GCP_SA_KEY }} | ||
# export_default_credentials: true | ||
|
||
- name: Upload coverage to codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
file: ./coverage.xml | ||
fail_ci_if_error: true | ||
# - name: Run live tests | ||
# run: | | ||
# make test-live-cloud | ||
# env: | ||
# LIVE_AZURE_CONTAINER: ${{ secrets.LIVE_AZURE_CONTAINER }} | ||
# AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} | ||
# LIVE_GS_BUCKET: ${{ secrets.LIVE_GS_BUCKET }} | ||
# LIVE_S3_BUCKET: ${{ secrets.LIVE_S3_BUCKET }} | ||
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
# CUSTOM_S3_BUCKET: ${{secrets.CUSTOM_S3_BUCKET}} | ||
# CUSTOM_S3_KEY_ID: ${{secrets.CUSTOM_S3_KEY_ID}} | ||
# CUSTOM_S3_SECRET_KEY: ${{secrets.CUSTOM_S3_SECRET_KEY}} | ||
# CUSTOM_S3_ENDPOINT: ${{secrets.CUSTOM_S3_ENDPOINT}} | ||
|
||
# - name: Upload coverage to codecov | ||
# uses: codecov/codecov-action@v1 | ||
# with: | ||
# file: ./coverage.xml | ||
# fail_ci_if_error: true | ||
|
||
extras-test: | ||
name: Test independent installs of clients | ||
needs: tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
extra: ["s3", "azure", "gs"] | ||
include: | ||
- prefix: "s3" | ||
extra: "s3" | ||
- prefix: "az" | ||
extra: "azure" | ||
- prefix: "gs" | ||
extra: "gs" | ||
# extras-test: | ||
# name: Test independent installs of clients | ||
# needs: tests | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# extra: ["s3", "azure", "gs"] | ||
# include: | ||
# - prefix: "s3" | ||
# extra: "s3" | ||
# - prefix: "az" | ||
# extra: "azure" | ||
# - prefix: "gs" | ||
# extra: "gs" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.8 | ||
cache: "pip" | ||
cache-dependency-path: | | ||
pyproject.toml | ||
requirements-dev.txt | ||
# - name: Set up Python | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: 3.8 | ||
# cache: "pip" | ||
# cache-dependency-path: | | ||
# pyproject.toml | ||
# requirements-dev.txt | ||
|
||
- name: Build cloudpathlib | ||
run: | | ||
pip install --upgrade pip build | ||
make dist # build cloudpathlib wheel | ||
# - name: Build cloudpathlib | ||
# run: | | ||
# pip install --upgrade pip build | ||
# make dist # build cloudpathlib wheel | ||
|
||
- name: Create empty venv | ||
run: | | ||
python -m venv ${{ matrix.extra }}-env | ||
# - name: Create empty venv | ||
# run: | | ||
# python -m venv ${{ matrix.extra }}-env | ||
|
||
- name: Install cloudpathlib[${{ matrix.extra }}] | ||
run: | | ||
source ${{ matrix.extra }}-env/bin/activate | ||
pip install "$(find dist -name 'cloudpathlib*.whl')[${{ matrix.extra }}]" | ||
# - name: Install cloudpathlib[${{ matrix.extra }}] | ||
# run: | | ||
# source ${{ matrix.extra }}-env/bin/activate | ||
# pip install "$(find dist -name 'cloudpathlib*.whl')[${{ matrix.extra }}]" | ||
|
||
- name: Test ${{ matrix.extra }} usage | ||
run: | | ||
source ${{ matrix.extra }}-env/bin/activate | ||
python -c 'from cloudpathlib import CloudPath; CloudPath("${{ matrix.prefix }}://bucket/test")' | ||
env: | ||
AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} | ||
# - name: Test ${{ matrix.extra }} usage | ||
# run: | | ||
# source ${{ matrix.extra }}-env/bin/activate | ||
# python -c 'from cloudpathlib import CloudPath; CloudPath("${{ matrix.prefix }}://bucket/test")' | ||
# env: | ||
# AZURE_STORAGE_CONNECTION_STRING: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} | ||
|
||
notify: | ||
name: Notify failed build | ||
needs: [code-quality, tests, live-tests, extras-test] | ||
# needs: [code-quality, tests, live-tests, extras-test] | ||
needs: [tests] | ||
if: failure() && github.event.pull_request == null | ||
runs-on: ubuntu-latest | ||
steps: | ||
|