Codebase list python-faraday / 78dcaf8 .gitlab / ci / testing / .hypothesis-nix-gitlab-ci.yml
78dcaf8

Tree @78dcaf8 (Download .tar.gz)

.hypothesis-nix-gitlab-ci.yml @78dcaf8raw · history · blame

test_hypothesis:
    tags:
        - hypothesis
    image: nixorg/nix
    stage: test
    allow_failure: true
    script:
        - nix-env -if pynixify/nixpkgs.nix -A vault
        - !reference [ .get_secrets, script ]
        - nix-env -if pynixify/nixpkgs.nix -A cachix
        - mkdir -p ~/.config/cachix
        - export USER=$(whoami)
        - echo "$CACHIX_CONFG" >~/.config/cachix/cachix.dhall
        - cachix use faradaysec
        - "echo 'hosts: files dns' >/etc/nsswitch.conf"
        - export LC_ALL=C.UTF-8
        - export LANG=C.UTF-8
        - mkdir -p ~/.faraday/config
        - cp tests/data/server.ini ~/.faraday/config
        - mkdir run_from
        - nix-shell --command "pytest tests -v --cov=faraday/server/api --disable-warnings --connection-string=postgresql+psycopg2://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB -m hypothesis"
    rules:
      - if: $HYPO_TEST
        when: on_success
      - !reference [.pipeline-control-test, rules]
      - when: never