forked from meltano/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
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
3 changed files
with
36 additions
and
28 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,30 +20,41 @@ jobs: | |
lint: | ||
name: Lint ${{ matrix.cookiecutter }}, Replay ${{ matrix.replay }} on ${{ matrix.python-version }} ${{ matrix.python-version }} / ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
NOXSESSION: ${{ matrix.session }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
include: | ||
- { cookiecutter: "tap-template", replay: "tap-graphql-jwt.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { cookiecutter: "tap-template", replay: "tap-rest-api_key-github.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { cookiecutter: "tap-template", replay: "tap-rest-basic_auth.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { cookiecutter: "tap-template", replay: "tap-rest-bearer_token.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { cookiecutter: "tap-template", replay: "tap-rest-custom.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { cookiecutter: "tap-template", replay: "tap-rest-jwt.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { cookiecutter: "tap-template", replay: "tap-rest-oauth2.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { cookiecutter: "tap-template", replay: "tap-other-custom.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { cookiecutter: "tap-template", replay: "tap-sql-custom.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { cookiecutter: "target-template", replay: "target-per_record.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { session: test_cookiecutter(replay_file_path="tap-graphql-jwt.json"), cookiecutter: "tap-template", replay: "tap-graphql-jwt.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { session: test_cookiecutter(replay_file_path="tap-rest-api_key-github.json"), cookiecutter: "tap-template", replay: "tap-rest-api_key-github.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { session: test_cookiecutter(replay_file_path="tap-rest-basic_auth.json"), cookiecutter: "tap-template", replay: "tap-rest-basic_auth.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { session: test_cookiecutter(replay_file_path= "tap-rest-bearer_token.json"), cookiecutter: "tap-template", replay: "tap-rest-bearer_token.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { session: test_cookiecutter(replay_file_path="tap-rest-custom.json"), cookiecutter: "tap-template", replay: "tap-rest-custom.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { session: test_cookiecutter(replay_file_path="tap-rest-jwt.json"), cookiecutter: "tap-template", replay: "tap-rest-jwt.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { session: test_cookiecutter(replay_file_path="tap-rest-oauth2.json"), cookiecutter: "tap-template", replay: "tap-rest-oauth2.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { session: test_cookiecutter(replay_file_path="tap-other-custom.json"), cookiecutter: "tap-template", replay: "tap-other-custom.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { session: test_cookiecutter(replay_file_path="tap-sql-custom.json"), cookiecutter: "tap-template", replay: "tap-sql-custom.json", python-version: "3.9", os: "ubuntu-latest" } | ||
- { session: test_cookiecutter(replay_file_path="target-per_record.json"), cookiecutter: "target-template", replay: "target-per_record.json", python-version: "3.9", os: "ubuntu-latest" } | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/[email protected] | ||
|
||
- name: Install Poetry | ||
env: | ||
PIP_CONSTRAINT: .github/workflows/constraints.txt | ||
run: | | ||
pipx install poetry | ||
poetry --version | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
architecture: x64 | ||
cache: 'pip' | ||
cache-dependency-path: 'poetry.lock' | ||
|
||
- name: Upgrade pip | ||
env: | ||
|
@@ -52,32 +63,28 @@ jobs: | |
pip install pip | ||
pip --version | ||
- name: Install Poetry, Tox & Cookiecutter | ||
- name: Install Nox | ||
env: | ||
PIP_CONSTRAINT: .github/workflows/constraints.txt | ||
run: | | ||
pipx install poetry | ||
pipx install cookiecutter | ||
pipx install tox | ||
- name: Build cookiecutter project | ||
env: | ||
CC_TEMPLATE: cookiecutter/${{ matrix.cookiecutter }} | ||
REPLAY_FILE: e2e-tests/cookiecutters/${{ matrix.replay }} | ||
pipx install --pip-args=--constraint=.github/workflows/constraints.txt nox | ||
pipx inject --pip-args=--constraint=.github/workflows/constraints.txt nox nox-poetry | ||
nox --version | ||
- name: Run Nox | ||
run: | | ||
chmod +x ./e2e-tests/cookiecutters/test_cookiecutter.sh | ||
./e2e-tests/cookiecutters/test_cookiecutter.sh $CC_TEMPLATE $REPLAY_FILE 0 | ||
nox --python=${{ matrix.python-version }} | ||
‚ | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.replay }} | ||
path: | | ||
${{ env.CC_TEST_OUTPUT }}/ | ||
!${{ env.CC_TEST_OUTPUT }}/.mypy_cache/ | ||
${{ env.cc_test_output }}/ | ||
!${{ env.cc_test_output }}/.mypy_cache/ | ||
- name: Run lint | ||
env: | ||
REPLAY_FILE: e2e-tests/cookiecutters/${{ matrix.replay }} | ||
run: | | ||
cd $CC_TEST_OUTPUT | ||
cd $cc_test_output | ||
poetry run tox -e lint |
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