PLT-5885 create github action for e2e tests #17
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: "E2E Tests" | |
env: | |
CACHE_NAME: marlowe-playground-temp | |
ALLOWED_URIS: "https://github.com https://api.github.com" | |
TRUSTED_PUBLIC_KEYS: "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= marlowe-playground-temp.cachix.org-1:1gPjVFpu4QjaAT3tRurCioX+BC23V7mjvFwpP5bV0Ec= loony-tools:pr9m4BkM/5/eSTZlkQyRt57Jz7OMBxNSUiMC4FkcNfk=" | |
SUBSTITUTERS: "https://cache.nixos.org/ https://cache.iog.io https://marlowe-playground-temp.cachix.org https://cache.zw3rk.com/" | |
COMMON_CONFIG_FILE: "env/common.env" | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_call: | |
jobs: | |
integration: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v3 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v20 | |
with: | |
nix_path: nixpkgs=channel:nixos-unstable | |
install_url: https://releases.nixos.org/nix/nix-2.10.3/install | |
extra_nix_config: | | |
allowed-uris = ${{ env.ALLOWED_URIS }} | |
trusted-public-keys = ${{ env.TRUSTED_PUBLIC_KEYS }} | |
substituters = ${{ env.SUBSTITUTERS }} | |
experimental-features = nix-command flakes | |
- name: Setup Cachix | |
uses: cachix/cachix-action@v12 | |
with: | |
name: ${{ env.CACHE_NAME }} | |
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18.12.1' | |
cache: 'npm' | |
- name: Update npm | |
run: npm install -g npm@8.19.2 | |
- name: Install cucumber | |
run: npm install cucumber | |
- name: Check PATH and Cucumber | |
run: | | |
echo $PATH | |
which cucumber-js || true | |
npm bin -g | |
- name: Run E2E tests | |
run: | | |
nix develop --command bash -c 'cd e2e && npm install && . ./run_tests.sh @dev' |