-
Notifications
You must be signed in to change notification settings - Fork 7
feat: Identity compatibility #85
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
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
037f262
feat: Identity compatibility
ptiurin 4b87d2a
fix unit tests
ptiurin e734bd5
async fix
ptiurin 49f9815
Skip test
ptiurin 368de45
Integration test CI
ptiurin b97bc50
adding v0 integration tests
ptiurin ed09717
better tests
ptiurin 992312f
ci
ptiurin ba93bb0
fix secret name
ptiurin b35f245
docs: modify docs
ptiurin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,103 @@ | ||
name: v0.x Nightly code check | ||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 4 * * *' # 4 am UTC every day | ||
jobs: | ||
code-check: | ||
uses: ./.github/workflows/code-check.yml | ||
with: | ||
branch: 0.x | ||
unit-tests: | ||
uses: ./.github/workflows/unit-tests.yml | ||
with: | ||
branch: 0.x | ||
secrets: | ||
GIST_PAT: ${{ secrets.GIST_PAT }} | ||
security-scan: | ||
needs: [unit-tests] | ||
uses: ./.github/workflows/security-scan.yml | ||
with: | ||
branch: 0.x | ||
secrets: | ||
FOSSA_TOKEN: ${{ secrets.FOSSA_TOKEN }} | ||
SONARCLOUD_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} | ||
tests: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false # finish all jobs even if one fails | ||
max-parallel: 2 | ||
matrix: | ||
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
python-version: ['3.7', '3.8', '3.9', '3.10'] | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install ".[dev]" | ||
|
||
- name: Test with pytest | ||
run: | | ||
pytest tests/unit | ||
|
||
- name: Setup database and engine | ||
id: setup | ||
uses: firebolt-db/integration-testing-setup@v1 | ||
with: | ||
firebolt-username: ${{ secrets.FIREBOLT_USERNAME }} | ||
firebolt-password: ${{ secrets.FIREBOLT_PASSWORD }} | ||
api-endpoint: "api.dev.firebolt.io" | ||
region: "us-east-1" | ||
db_suffix: ${{ format('{0}_{1}', matrix.os, matrix.python-version) }} | ||
|
||
- name: Restore cached failed tests | ||
id: cache-tests-restore | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
.pytest_cache/v/cache/lastfailed | ||
key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} | ||
|
||
- name: Run integration tests | ||
env: | ||
USER_NAME: ${{ secrets.FIREBOLT_USERNAME }} | ||
PASSWORD: ${{ secrets.FIREBOLT_PASSWORD }} | ||
SERVICE_ID: ${{ secrets.SERVICE_ID }} | ||
SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }} | ||
DATABASE_NAME: ${{ steps.setup.outputs.database_name }} | ||
ENGINE_NAME: ${{ steps.setup.outputs.engine_name }} | ||
ENGINE_URL: ${{ steps.setup.outputs.engine_url }} | ||
STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }} | ||
STOPPED_ENGINE_URL: ${{ steps.setup.outputs.stopped_engine_url }} | ||
ACCOUNT_NAME: "firebolt" | ||
FIREBOLT_BASE_URL: "api.dev.firebolt.io" | ||
run: | | ||
pytest --last-failed -o log_cli=true -o log_cli_level=INFO --junit-xml=report/junit.xml tests/integration | ||
|
||
- name: Save failed tests | ||
id: cache-tests-save | ||
uses: actions/cache/save@v3 | ||
if: failure() | ||
with: | ||
path: | | ||
.pytest_cache/v/cache/lastfailed | ||
key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} | ||
|
||
- name: Slack Notify of failure | ||
if: failure() | ||
id: slack | ||
uses: firebolt-db/action-slack-nightly-notify@v1 | ||
with: | ||
os: ${{ matrix.os }} | ||
programming-language: Python | ||
language-version: ${{ matrix.python-version }} | ||
notifications-channel: 'ecosystem-ci-notifications' | ||
slack-api-key: ${{ secrets.SLACK_BOT_TOKEN }} |
This file contains hidden or 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 hidden or 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,74 @@ | ||
name: v0.x Integration tests | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
secrets: | ||
FIREBOLT_USERNAME: | ||
required: true | ||
FIREBOLT_PASSWORD: | ||
required: true | ||
SERVICE_ID: | ||
required: true | ||
SERVICE_SECRET: | ||
required: true | ||
|
||
jobs: | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: 0.x | ||
|
||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ".[dev]" | ||
|
||
- name: Setup database and engine | ||
id: setup | ||
uses: firebolt-db/integration-testing-setup@v1 | ||
with: | ||
firebolt-username: ${{ secrets.FIREBOLT_USERNAME }} | ||
firebolt-password: ${{ secrets.FIREBOLT_PASSWORD }} | ||
api-endpoint: "api.dev.firebolt.io" | ||
region: "us-east-1" | ||
|
||
- name: Restore cached failed tests | ||
id: cache-tests-restore | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: | | ||
.pytest_cache/v/cache/lastfailed | ||
key: ${{ runner.os }}-pytest-restore-failed-${{ github.ref }}-${{ github.sha }} | ||
|
||
- name: Run integration tests | ||
env: | ||
USER_NAME: ${{ secrets.FIREBOLT_USERNAME }} | ||
PASSWORD: ${{ secrets.FIREBOLT_PASSWORD }} | ||
SERVICE_ID: ${{ secrets.SERVICE_ID }} | ||
SERVICE_SECRET: ${{ secrets.SERVICE_SECRET }} | ||
DATABASE_NAME: ${{ steps.setup.outputs.database_name }} | ||
ENGINE_NAME: ${{ steps.setup.outputs.engine_name }} | ||
ENGINE_URL: ${{ steps.setup.outputs.engine_url }} | ||
STOPPED_ENGINE_NAME: ${{ steps.setup.outputs.stopped_engine_name }} | ||
STOPPED_ENGINE_URL: ${{ steps.setup.outputs.stopped_engine_url }} | ||
FIREBOLT_BASE_URL: "api.dev.firebolt.io" | ||
run: | | ||
pytest --last-failed -o log_cli=true -o log_cli_level=INFO tests/integration | ||
|
||
- name: Save failed tests | ||
id: cache-tests-save | ||
uses: actions/cache/save@v3 | ||
if: failure() | ||
with: | ||
path: | | ||
.pytest_cache/v/cache/lastfailed | ||
key: ${{ steps.cache-tests-restore.outputs.cache-primary-key }} |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will happen if action is triggered automatically from a push to 0.x branch? Will
inputs.branch
have a correct value?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When empty it defaults to the "event" that triggered the run. In this case it will checkout 0.x branch.
https://github.com/actions/checkout#usage