Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
bea9b78
test: add 71 unit test files to reach 80% line coverage
mateuscardosodeveloper Apr 22, 2026
2c95af1
test: raise branch coverage above 80% and wire CI to test:coverage
mateuscardosodeveloper Apr 22, 2026
75d6699
refactor: add tsBuildInfoFile option to TypeScript configuration
mateuscardosodeveloper Apr 22, 2026
fffc9da
chore: update GitHub Actions to use checkout and setup-node v6
mateuscardosodeveloper Apr 22, 2026
7025357
feat(deploy): add --all and -t/--token flags for CI/CD
mateuscardosodeveloper Apr 22, 2026
844e2e1
docs(readme): add CI/CD pipelines section
mateuscardosodeveloper Apr 22, 2026
93d094a
test(deploy): cover --all, -t/--token, and legacy "all" rejection
mateuscardosodeveloper Apr 22, 2026
170ee17
test(deploy): add tests for interactive analysis selection and confir…
mateuscardosodeveloper Apr 22, 2026
2dc2d77
refactor(deploy): move IDeployOptions interface definition for better…
mateuscardosodeveloper Apr 22, 2026
7001106
Merge branch 'feat/cli-refactoring-deps' into feat/cli-refactoring-tests
mateuscardosodeveloper Apr 23, 2026
3a60a2c
refactor(tests): enforce return type for errorHandlerMock and clean u…
mateuscardosodeveloper Apr 23, 2026
73fc688
Merge branch 'feat/cli-refactoring-tests' into feat/cli-refactoring-c…
mateuscardosodeveloper Apr 23, 2026
60c5792
fix(run): use Node's native type-stripping, drop removed @swc-node/re…
mateuscardosodeveloper Apr 24, 2026
85cf615
fix(docs): update example commands to use short options for consistency
mateuscardosodeveloper Apr 24, 2026
56d8929
fix(run): switch to tsx loader for CJS-compatible TS execution
mateuscardosodeveloper Apr 24, 2026
b94b707
feat(backup): restore device params and serial tokens on restore
mateuscardosodeveloper Apr 24, 2026
32dbc0e
feat(restore): enhance param restoration logic to skip existing keys …
mateuscardosodeveloper Apr 24, 2026
8bd56d6
Merge pull request #32 from tago-io/feat/cli-refactoring-ci-cd
vitorfdl Apr 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
node-version: [ 24.x ]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run linter
- run: npm test
- run: npm run test:coverage
- run: npm run build --if-present
env:
CI: true
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: "24.x"
registry-url: "https://registry.npmjs.org"
Expand Down
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Analysis.use(startAnalysis, { token: process.env.T_ANALYSIS_TOKEN });

```

If you want to use the Debugger with -D, make sure you have a **.swcrc** file with sourceMaps activated. This repository contains a .swcrc.example file if you prefer to just copy to your folder.
`tagoio run` executes your TypeScript file directly using Node's native experimental-transform-types runtime, so no build step or loader configuration is required. The `-d` flag forwards to Node so you can attach a debugger.

## Working with Environments

Expand Down Expand Up @@ -198,6 +198,37 @@ Having a `tagoconfig.json` file is essential for executing several commands, suc
```


## Using in CI/CD Pipelines

Deploy every analysis from `tagoconfig.json` directly from a GitHub Actions workflow — no need to maintain a custom deploy script per project:

```yaml
- name: Install TagoIO CLI and builder
run: npm install -g @tago-io/cli @tago-io/builder

- name: Deploy analyses to TagoIO
run: tagoio deploy --all --env production -t ${{ secrets.TAGOIO_TOKEN }} --silent
```

The flag combination:
- `--all` — deploys every analysis registered in `tagoconfig.json` without any interactive prompt
- `--env, --environment` — picks the environment block from `tagoconfig.json`
- `-t, --token` — a TagoIO token. Accepts either a **profile token** or an **external-analysis token** (see permissions below). Bypasses the local `.tago-lock` file, which doesn't exist in CI runners
- `--silent` — skips confirmation prompts

Together, the command runs fully non-interactively — suitable for any CI/CD system. No call to `tagoio init` or `tagoio login` is required before deploy, but your repository **must** include a pre-configured `tagoconfig.json` mapping each analysis file to its analysis ID.

### Required permissions when using an external-analysis token

Profile tokens always have full access and need no extra setup. If you'd rather use a scoped external-analysis token (recommended for least-privilege CI pipelines), create an Access Management rule in TagoIO with the **Analysis** resource type and the following permissions enabled:

- **Access Analysis**
- **Edit Analysis**
- **Upload Analysis Script**

Attach that rule to the token you pass via `-t, --token`. Without these permissions, `tagoio deploy` will fail with an Authorization Denied error from the TagoIO API.


## License

TagoIO SDK for JavaScript in the browser and Node.js is released under the [Apache-2.0 License](https://github.com/tagoio-cli/blob/master/LICENSE.md).
Loading