Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update dependencies including github3.py #3073

Merged
merged 5 commits into from
Feb 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 19 additions & 101 deletions .github/workflows/feature_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,7 @@ jobs:
lint:
name: Lint
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Set up Python 3.8
id: py
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: pip cache
id: pip_cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: pre-commit cache
id: pc_cache
uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: ${{ steps.py.outputs.python-version }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ steps.py.outputs.python-version }}-pre-commit-
- name: Install dependencies
run: |
python -m pip install -U pip
pip install pre-commit
- name: Install pre-commit
if: steps.pc_cache.outputs.cache-hit != 'true'
run: |
pre-commit install --install-hooks
- name: Run pre-commit on changed files
run: |
git fetch --depth=1 --no-tags origin $GITHUB_BASE_REF:$GITHUB_BASE_REF
git fetch --depth=1 --no-tags origin $GITHUB_HEAD_REF:$GITHUB_HEAD_REF
pre-commit run --files $(git diff --diff-filter=d --name-only $GITHUB_BASE_REF..$GITHUB_HEAD_REF)
uses: SFDO-Tooling/.github/.github/workflows/pre-commit.yml@main
docs:
name: Build Docs
if: ${{ github.event_name == 'pull_request' }}
Expand All @@ -70,18 +31,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: pip cache
id: pip_cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: Install dependencies
run: |
python -m pip install -U pip
make dev-install
run: make dev-install
- name: Build Docs
run: make docs

Expand All @@ -99,17 +52,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: "${{ matrix.python-version }}"
- name: pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: Install
run: |
python -m pip install -U pip
make dev-install
run: make dev-install
- run: |
coverage run $(which pytest)
coveralls
Expand All @@ -123,17 +69,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: Install Python dependencies
run: |
python -m pip install -U pip
make dev-install
run: make dev-install
- name: Install sfdx
run: |
mkdir sfdx
Expand Down Expand Up @@ -177,17 +116,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: Install Python dependencies
run: |
python -m pip install -U pip
make dev-install
run: make dev-install
- name: Install sfdx
run: |
mkdir sfdx
Expand Down Expand Up @@ -231,17 +163,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: Install Python dependencies
run: |
python -m pip install -U pip
make dev-install
run: make dev-install
- name: Install sfdx
run: |
mkdir sfdx
Expand Down Expand Up @@ -285,17 +210,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: Install Python dependencies
run: |
python -m pip install -U pip
make dev-install
run: make dev-install
- name: Install sfdx
run: |
mkdir sfdx
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/release_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: Install Python dependencies
run: |
python -m pip install -U pip
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/slow_integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: pip cache
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
cache-dependency-path: "requirements/*.txt"
- name: Install Python dependencies
run: |
python -m pip install -U pip
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ update-deps:
pip-compile --upgrade requirements/dev.in

dev-install:
pip install --upgrade pip-tools
python -m pip install --upgrade pip pip-tools setuptools
pip-sync requirements/*.txt
pip install -e .
python -m pip install -e .

schema:
python -c 'from cumulusci.utils.yaml import cumulusci_yml; open("cumulusci/schema/cumulusci.jsonschema.json", "w").write(cumulusci_yml.CumulusCIRoot.schema_json(indent=4))'
@pre-commit run prettier --files cumulusci/schema/cumulusci.jsonschema.json > /dev/null || true
@echo cumulusci/schema/cumulusci.jsonschema.json
python -c 'from cumulusci.utils.yaml import cumulusci_yml; open("cumulusci/schema/cumulusci.jsonschema.json", "w").write(cumulusci_yml.CumulusCIRoot.schema_json(indent=4))'
@pre-commit run prettier --files cumulusci/schema/cumulusci.jsonschema.json > /dev/null || true
@echo cumulusci/schema/cumulusci.jsonschema.json
14 changes: 7 additions & 7 deletions cumulusci/core/tests/test_github.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def test_get_tag_by_name(self, repo):
self.init_github()
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/tag_SHA",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/tag_SHA",
json=self._get_expected_tag_ref("tag_SHA", "tag_SHA"),
status=200,
)
Expand All @@ -317,7 +317,7 @@ def test_get_tag_by_name__404(self, repo):
self.init_github()
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/tag_SHA",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/tag_SHA",
json=self._get_expected_tag_ref("tag_SHA", "tag_SHA"),
status=200,
)
Expand All @@ -337,7 +337,7 @@ def test_current_tag_is_lightweight(self, repo):
light_tag["object"]["type"] = "commit"
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/tag_SHA",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/tag_SHA",
json=light_tag,
status=200,
)
Expand All @@ -357,7 +357,7 @@ def test_get_ref_by_name(self, repo):
self.init_github()
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/tag_SHA",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/tag_SHA",
json=self._get_expected_tag_ref("tag_SHA", "tag_SHA"),
status=200,
)
Expand All @@ -369,7 +369,7 @@ def test_get_ref_by_name__404(self, repo):
self.init_github()
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/tag_SHA",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/tag_SHA",
json=self._get_expected_tag_ref("tag_SHA", "tag_SHA"),
status=404,
)
Expand All @@ -381,7 +381,7 @@ def test_get_version_id_from_tag(self, repo):
self.init_github()
responses.add( # the ref for the tag is fetched first
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/test-tag-name",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/test-tag-name",
json=self._get_expected_tag_ref("test-tag-name", "tag_SHA"),
status=200,
)
Expand All @@ -400,7 +400,7 @@ def test_get_version_id_from_tag__dependency_error(self, repo):
self.init_github()
responses.add( # the ref for the tag is fetched first
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/test-tag-name",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/test-tag-name",
json=self._get_expected_tag_ref("test-tag-name", "tag_SHA"),
status=200,
)
Expand Down
22 changes: 11 additions & 11 deletions cumulusci/core/tests/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_resolve__default(self):
)
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/release/1.0",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/release/1.0",
json=self._get_expected_tag_ref("release/1.0", "tag_sha"),
)
responses.add(
Expand Down Expand Up @@ -132,7 +132,7 @@ def test_resolve__ref(self):
)
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/main",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/main",
json=self._get_expected_ref("main", "abcdef"),
)

Expand All @@ -155,7 +155,7 @@ def test_resolve__branch(self):
)
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/heads/main",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/heads/main",
json=self._get_expected_ref("main", "abcdef"),
)

Expand All @@ -178,7 +178,7 @@ def test_resolve__tag(self):
)
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/release/1.0",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/release/1.0",
json=self._get_expected_tag_ref("release/1.0", "abcdef"),
)

Expand Down Expand Up @@ -207,7 +207,7 @@ def test_resolve__latest_release(self):
)
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/release/1.0",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/release/1.0",
json=self._get_expected_tag_ref("release/1.0", "tag_sha"),
)

Expand Down Expand Up @@ -236,7 +236,7 @@ def test_resolve__latest_beta(self):
)
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/beta/1.0-Beta_1",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/beta/1.0-Beta_1",
json=self._get_expected_tag_ref("beta/1.0-Beta_1", "tag_sha"),
)

Expand Down Expand Up @@ -270,7 +270,7 @@ def test_resolve__previous_release(self):
)
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/release/1.0",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/release/1.0",
json=self._get_expected_tag_ref("release/1.0", "tag_sha"),
)

Expand Down Expand Up @@ -320,7 +320,7 @@ def test_fetch(self):
)
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/release/1.0",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/release/1.0",
json=self._get_expected_tag_ref("release/1.0", "tag_sha"),
)
f = io.BytesIO()
Expand Down Expand Up @@ -375,7 +375,7 @@ def test_fetch__cleans_up_after_failed_extract(self, download_extract_github):
)
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/release/1.0",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/release/1.0",
json=self._get_expected_tag_ref("release/1.0", "tag_sha"),
)
# Set up a fake IOError while extracting the zipball
Expand Down Expand Up @@ -409,7 +409,7 @@ def test_hash(self):
)
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/release/1.0",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/release/1.0",
json=self._get_expected_tag_ref("release/1.0", "tag_sha"),
)

Expand Down Expand Up @@ -437,7 +437,7 @@ def test_frozenspec(self):
)
responses.add(
"GET",
"https://api.github.com/repos/TestOwner/TestRepo/git/refs/tags/release/1.0",
"https://api.github.com/repos/TestOwner/TestRepo/git/ref/tags/release/1.0",
json=self._get_expected_tag_ref("release/1.0", "tag_sha"),
)

Expand Down
Loading