Skip to content

Commit

Permalink
really run those tests
Browse files Browse the repository at this point in the history
  • Loading branch information
keelerm84 committed Aug 12, 2024
1 parent 2e7a063 commit f373c1b
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 61 deletions.
137 changes: 76 additions & 61 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.8"]

services:
redis:
Expand All @@ -43,8 +43,8 @@ jobs:
- name: Install poetry
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439

- uses: ./.github/actions/build
- uses: ./.github/actions/build-docs
# - uses: ./.github/actions/build
# - uses: ./.github/actions/build-docs

- name: Run tests
run: make test
Expand All @@ -57,6 +57,21 @@ jobs:
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test
- run: make test

- name: Verify typehints
run: make lint
Expand All @@ -76,61 +91,61 @@ jobs:
test_service_port: 9000
token: ${{ secrets.GITHUB_TOKEN }}

windows:
runs-on: windows-latest

defaults:
run:
shell: powershell

strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Setup DynamoDB
run: |
$ProgressPreference = "SilentlyContinue"
iwr -outf dynamo.zip https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip
mkdir dynamo
Expand-Archive -Path dynamo.zip -DestinationPath dynamo
cd dynamo
cmd /c "START /b java -Djava.library.path=./DynamoDBLocal_lib -jar ./DynamoDBLocal.jar"
- name: Setup Consul
run: |
$ProgressPreference = "SilentlyContinue"
iwr -outf consul.zip https://releases.hashicorp.com/consul/1.4.2/consul_1.4.2_windows_amd64.zip
mkdir consul
Expand-Archive -Path consul.zip -DestinationPath consul
cd consul
sc.exe create "Consul" binPath="$(Get-Location)/consul.exe agent -dev"
sc.exe start "Consul"
- name: Setup Redis
run: |
$ProgressPreference = "SilentlyContinue"
iwr -outf redis.zip https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip
mkdir redis
Expand-Archive -Path redis.zip -DestinationPath redis
cd redis
./redis-server --service-install
./redis-server --service-start
Start-Sleep -s 5
./redis-cli ping
- name: Install poetry
uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439

- name: Install requirements
run: poetry install --all-extras

- name: Run tests
run: make test
# windows:
# runs-on: windows-latest
#
# defaults:
# run:
# shell: powershell
#
# strategy:
# fail-fast: false
# matrix:
# python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
#
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
#
# - name: Setup DynamoDB
# run: |
# $ProgressPreference = "SilentlyContinue"
# iwr -outf dynamo.zip https://s3-us-west-2.amazonaws.com/dynamodb-local/dynamodb_local_latest.zip
# mkdir dynamo
# Expand-Archive -Path dynamo.zip -DestinationPath dynamo
# cd dynamo
# cmd /c "START /b java -Djava.library.path=./DynamoDBLocal_lib -jar ./DynamoDBLocal.jar"
#
# - name: Setup Consul
# run: |
# $ProgressPreference = "SilentlyContinue"
# iwr -outf consul.zip https://releases.hashicorp.com/consul/1.4.2/consul_1.4.2_windows_amd64.zip
# mkdir consul
# Expand-Archive -Path consul.zip -DestinationPath consul
# cd consul
# sc.exe create "Consul" binPath="$(Get-Location)/consul.exe agent -dev"
# sc.exe start "Consul"
#
# - name: Setup Redis
# run: |
# $ProgressPreference = "SilentlyContinue"
# iwr -outf redis.zip https://github.com/MicrosoftArchive/redis/releases/download/win-3.0.504/Redis-x64-3.0.504.zip
# mkdir redis
# Expand-Archive -Path redis.zip -DestinationPath redis
# cd redis
# ./redis-server --service-install
# ./redis-server --service-start
# Start-Sleep -s 5
# ./redis-cli ping
#
# - name: Install poetry
# uses: abatilo/actions-poetry@7b6d33e44b4f08d7021a1dee3c044e9c253d6439
#
# - name: Install requirements
# run: poetry install --all-extras
#
# - name: Run tests
# run: make test
3 changes: 3 additions & 0 deletions ldclient/impl/integrations/files/file_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def _load_file(self, path, all_data):
with open(path, 'r') as f:
content = f.read()
parsed = self._parse_content(content)
logger.warning('Parsed content: %s' % parsed)
for key, flag in parsed.get('flags', {}).items():
_sanitize_json_item(flag)
self._add_item(all_data, FEATURES, flag)
Expand Down Expand Up @@ -220,4 +221,6 @@ def _check_file_times(self):
ret[path] = os.path.getmtime(path)
except:
ret[path] = None

logger.warning('File %s last modified at %s' % (path, ret[path]))
return ret

0 comments on commit f373c1b

Please sign in to comment.