Skip to main content

Use Argos with GitHub Actions

Configure GitHub Actions to send screenshots to Argos visual testing platform.

1. Install Argos CLI

npm i --save-dev @argos-ci/cli

Read the CLI documentation if you need information about advanced usages.

2. Upload the screenshots

Add the following command to your CI workflow to upload screenshots to Argos:

npx @argos-ci/cli upload ./screenshots

Complete example

name: Argos

# Argos has to run on your reference branch to creates reference builds
branches: [main]
branches: [main]

runs-on: ubuntu-latest

- name: Check out repository code
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
node-version: current

- name: Install dependencies
run: npm ci

# -----
# 👉 Insert the steps required to take screenshots
# -----

- name: Upload screenshots to
continue-on-error: true
# 👇 change "./screenshots" by your screenshots folder path
run: npx @argos-ci/cli upload ./screenshots

For a repository examples, check out our GitHub repository.

What's next?

Congratulations on installing Argos! 🎉
The next step is to integrate visual review into your development workflow. Visit our review changes section to learn how to.


Force repository detection with ARGOS_TOKEN

To ensure seamless integration with GitHub Actions, the ARGOS_TOKEN is usually not required. However, if the automatic repository detection doesn't work, you may need to specify the token. If that's the case, follow these steps:
  1. Log in to Argos, navigate to your repository settings and copy your ARGOS_TOKEN.
  2. Navigate to your repository settings on GitHub and set a new repository secret called ARGOS_TOKEN with the value you have copied.
  3. Expose the ARGOS_TOKEN when you call the argos' upload command.
- name: Upload screenshots to
continue-on-error: true
run: npx @argos-ci/cli upload ./screenshots