Local testing
Many pull requests can be tested by using the Netlify link in the PR, but you must run a branch locally to test branches/releases that include changes to the database.
Last updated
Was this helpful?
Many pull requests can be tested by using the Netlify link in the PR, but you must run a branch locally to test branches/releases that include changes to the database.
Last updated
Was this helpful?
If you don't have one, create a directory for Github repos: $ mkdir ~/Documents/GitHub
From your repo directory, clone Moped: $ git clone https://github.com/cityofaustin/atd-moped
Follow the docker documentation to install docker in your system.
For Mac:
For Windows:
Run $ curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash
.
This will install the Hasura CLI in /usr/local/bin
. You might have to provide your sudo password depending on the permissions of your /usr/local/bin
location.
We use (nvm) to keep our node
versions in sync with our environments.
Install the Xcode Command Line Developer Tools: $ xcode-select --install
Install nvm according to the .
From the moped editor
directory, activate the current node
and npm
version required for this project: $ nvm use
Install dependencies: $ npm install
From the atd-moped
directory, run $ git fetch
to download the most recent code, files, and branches from Github. If you want to test a branch other than main
, run $ git checkout <branch-name>
.
You may be notified that your local code is behind the current state of the branch. Use $ git pull
to update.
You don't need to actively do anything with Docker Desktop, but you need the application running.
Start the cluster: $ ./hasura-cluster start
Optionally, open the Hasura console in your browser: $ ./hasura-cluster console
or $ hasura console
In a second Terminal tab, from the moped editor
directory, run $ npm install
to ensure that any new packages are installed.
Start the server: $ npm run start
To login, locate the username and pw in the DTS password store under the named "Moped Test Editor (local, staging, prod)."
When testing multiple PRs in a sitting, you need to run $ ./hasura-cluster restart
every time you check out a new branch.
You shouldn't need to re-run $ npm install
or log out of Moped.
In the Terminal tab running the application, end the npm process by typing Ctrl+C.
In the Terminal tab with the database, close the Hasura console (if running) by typing Ctrl+C. Then stop the database: $ ./hasura-cluster stop
Our tool provides for the Hasura commands we need frequently in Moped.
Open in your browser.