This framework targets the Coin Ranking API.
Configuration is stored in the below format. Auth token will need to be populated. It can be obtained from the RapidApi site.
{
"BASE_URL" : "https://coinranking1.p.rapidapi.com",
"AUTH_TOKEN" : "[ENTER_AUTH_TOKEN_HERE]"
}
All below jobs are dependant on each other and defined in .github/workflows/github-ci.yml
.
Build
: Ensures no build time errorsTest
: Ensures no failures during testsPublish
: Builds image and pushes to Dockerhub
Required GitHub repositry secrets
API_CONFIG
: Json string as per above configuration json.DOCKER_PASSWORD
: Username used to log into DockerhubDOCKER_USERNAME
: Password used to log into Dockerhub
- Install node and npm
- Ensure
src/config/env.json
file and populate with configuration json.
cd src
npm run build
npm run test
- Install docker
- Ensure
src/config/env.json
file and populate with configuration json.
Build the image locally.
docker build . -t [YourImageName]
Run the container.
docker run -it [YourImageName]
Filters can be appended to local and docker tests.
Documentation found here
Examples filters;
"(@coins and not @exchanges)"
"(@coins or @exchanges)"
"@coins"
- Local:
tags=@coins npm run test
- Docker:
docker run -it [YourImageName] --tags=@coins
Simply add parameter as per below
--parallel 3
- Proper versioning on docker images. At the moment all images are tagged with latest, ideally this would be an incremented major/minor version.
- Work out why the
exchanges/
endpoints aren't authenticating. - Logging