Migrate io-tests from bash to pytest
Authored-by: monacoremo <monacoremo>
This commit is contained in:
+5
-2
@@ -87,6 +87,8 @@ jobs:
|
||||
update: true
|
||||
packages:
|
||||
- postgresql-12
|
||||
- python3
|
||||
- python3-pip
|
||||
cache:
|
||||
yarn: true
|
||||
timeout: 1000
|
||||
@@ -107,17 +109,18 @@ jobs:
|
||||
fi
|
||||
travis_wait stack --no-terminal setup
|
||||
travis_wait stack --no-terminal install hpc
|
||||
pip3 install pytest pyyaml requests requests-unixsocket pyjwt
|
||||
script: |
|
||||
travis_wait 50 stack --no-terminal build --fast -j1 --coverage
|
||||
travis_wait 50 stack --no-terminal build --fast -j1 --coverage --test --no-run-tests
|
||||
test/with_tmp_db stack --no-terminal test --coverage
|
||||
test/with_tmp_db stack --no-terminal exec test/io-tests.sh
|
||||
test/with_tmp_db stack --no-terminal exec -- pytest -v test/io-tests
|
||||
after_script: |
|
||||
export _HPC_DIR=$(stack path --local-hpc-root)
|
||||
export _MIX_DIR=$(stack path --dist-dir)
|
||||
export _PKG_NAME=$(stack exec -- ghc-pkg field postgrest key --simple-output)
|
||||
# merge the results from `stack test` and the io tests and exclude Paths_postgrest
|
||||
stack --no-terminal exec hpc -- sum --union --exclude=Paths_postgrest --output=/tmp/all.tix $_HPC_DIR/combined/all/all.tix test/io-tests/postgrest.tix
|
||||
stack --no-terminal exec hpc -- sum --union --exclude=Paths_postgrest --output=/tmp/all.tix $_HPC_DIR/combined/all/all.tix postgrest.tix
|
||||
# fix a bug in stack-hpc-coveralls
|
||||
mv $_MIX_DIR/hpc/Main.mix $_MIX_DIR/hpc/$_PKG_NAME/Main.mix
|
||||
mv $_MIX_DIR/hpc/UnixSocket.mix $_MIX_DIR/hpc/$_PKG_NAME/UnixSocket.mix
|
||||
|
||||
Reference in New Issue
Block a user