Tests are implemented using the Mocha framework. You need to have Apify account to test all apify-cli features.
Then you can run tests with commands in repository root directory:
-
Install all dependencies:
npm install
-
Logout your current Apify account if you used some:
apify logout
-
Run tests using credentials of the 'apify-test' user:
TEST_USER_TOKEN=<apifyUserApiToken> npm run test
Only users with access to apify-cli package can publish new version.
Release of new versions is managed by GitHub Actions. On pushes to the master branch, prerelease versions are automatically produced. Latest releases are triggered manually through the GitHub release tool. After creating a release there, Actions will automatically produce the latest version of the package.
-
Manually increment version in
package.json
-
Create manifest file
npm run manifest
-
Generate command reference to
README.md
:npm run commands-md
-
Before publishing new version you have to generate and commit production
npm-shrinkwrap.json
npm run prod-shrinkwrap
NOTE: Filepackage-lock.json
will be completely ignored during package publishing. Usingnpm-shrinkwrap.json
will correctly lock dependencies. -
GitHub Actions build is triggered by a push to
master
(typically a merge of a PR). -
To trigger the latest release, go to the GitHub release tool (select
releases
under<> Code
). There, draft a new release, fill the form and hitPublish release
. Actions will automatically release the latest version of the package.