Run tests for commit - Update pip in github actions Hopefully this will fix the "localstack-ext produced metadata for project name unknown" pip error... #87
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
name: Test | |
run-name: | | |
Run tests for ${{ | |
(github.event_name == 'push' && format('commit - {0}', github.event.head_commit.message)) || | |
(github.event_name == 'pull_request' && format('PR #{0} - {1}', github.event.number, github.event.pull_request.title)) || | |
format('{0} (manually triggered)', github.ref_name) | |
}} | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: | |
- "main" | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test | |
strategy: | |
matrix: | |
PERSIST_FORMAT: ["json", "binary", "json,binary"] | |
fail-fast: false | |
env: | |
PERSIST_FORMAT: ${{ matrix.PERSIST_FORMAT }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo -E python3 test.py | |
- run: sudo -E docker compose logs | |
if: ${{ failure() }} | |
- name: rename files with colon chars | |
run: export COLON_CHAR="$(printf '\uf03a')"; find temp-persisted-data -type d -name "*:*" | perl -nle "print \$_, ' ', s/:/$COLON_CHAR/rg" | sudo xargs -L 1 mv | |
if: ${{ failure() }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: persisted-data | |
path: temp-persisted-data/ | |
retention-days: 7 | |
if: ${{ failure() }} | |
test_backward_compatibility: | |
name: Test backward-compatibility | |
strategy: | |
matrix: | |
TEST_PERSISTED_DATA_DIR: ["v2", "v3", "v3_binary"] | |
fail-fast: false | |
env: | |
SKIP_TEST_SETUP: 1 | |
TEST_PERSISTED_DATA_DIR: ${{ matrix.TEST_PERSISTED_DATA_DIR }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: sudo -E python3 test.py | |
- run: sudo -E docker compose logs | |
if: ${{ failure() }} | |
- name: rename files with colon chars | |
run: export COLON_CHAR="$(printf '\uf03a')"; find temp-persisted-data -type d -name "*:*" | perl -nle "print \$_, ' ', s/:/$COLON_CHAR/rg" | sudo xargs -L 1 mv | |
if: ${{ failure() }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: persisted-data | |
path: temp-persisted-data/ | |
retention-days: 7 | |
if: ${{ failure() }} | |
type-check: | |
name: Type check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: pip3 install --upgrade pip && pip3 install localstack moto jsonpickle==3.0.2 watchdog==3.0.0 boto3-stubs[essential,acm,es,iam] | |
- run: npx -y pyright src |