The package consists of two parts:
- cli located in
bin/ - test library located in
lib
bin/build.tsactor buildingbin/git.tsgit wrappers for getting relevant git commits and changed filesbin/github.tsgithub push event parsingbin/main.tsentrypoingbin/slack.tssending notifications to slackbin/test-report.tsprocessing vitest's test reports
lib/extend-expect.ts- custom matchersrun-test-result.ts-RunTestResultclass that's the output ofrunfunction- wrapper around run endpoints:
logLog,getStatistics,getDataset, etc
- wrapper around run endpoints:
- Clone and build
apify-test-toolsrepo:
git clone git@github.com:apify-projects/apify-test-tools.git
cd apify-test-tools
npm i
npm run buildFor testing purposes, we use testing-repo-for-github-actions repo so that we don't mess with the production repos:
git clone git@github.com:apify-store/testing-repo-for-github-actions.gitTo work on the library, you just need to define GITHUB_WORKSPACE to tell the cli where you repo is located:
export GITHUB_WORKSPACE=../path/to/testing-repo-for-github-actions # path to the repo
npx tsx bin/main.ts --help
npx tsx bin/main.ts get-commits --target-branch master --source-branch feat/testing-feature-branchYou need to istall the local version of apify-test-tools in your cloned testing-repo-for-github-actions:
npm i -D ../path/to/apify-test-toolsYou need to run npm run build inside apify-test-tools repo everytime you want to test your changes in testing-repo-for-github-actions.