coverage-badge-action
coverage-badge-action copied to clipboard
[BUG] Everything that is not versioned is being deleted
For example, the node_modules folder. Later stages of the pipeline that depend on it end up breaking.
Sounds bad, but wait, how did they get deleted? Could you provide your directory structure and action yaml?
Btw, did you just copied the demo action? -- https://github.com/we-cli/coverage-badge-action/blob/main/.github/workflows/test.yml#L11-L17
There is a cd .. which only fits the demo action itself. Not sure is it the problem..
Directory structure:
❯ tree -a -L 1 --dirsfirst
.
├── coverage
├── .git
├── .github
├── node_modules
├── out
├── resources
├── src
├── .vscode
├── .vscode-test
├── CHANGELOG.md
├── .editorconfig
├── eslint.config.mjs
├── .gitignore
├── LICENSE
├── package.json
├── package-lock.json
├── README.md
├── .tool-versions
├── tsconfig.json
├── .vscodeignore
└── .vscode-test.mjs
action.yaml:
name: 'Setup, Test and Package'
description: 'Shared setup, test and package steps'
runs:
using: composite
steps:
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: .tool-versions
- name: Install dependencies
run: npm install
shell: bash
- name: Run tests
run: xvfb-run -a npm run test:coverage
shell: bash
- name: ls-la before (for debug)
shell: bash
run: |
ls -la
- name: Update Coverage Badge
# if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
# if: github.ref_name == github.event.repository.default_branch
uses: we-cli/coverage-badge-action@main
- name: ls-la after (for debug)
shell: bash
run: |
ls -la
- name: Package
shell: bash
run: |
npx vsce ls --tree
npx vsce package --allow-star-activation
- uses: actions/upload-artifact@v4
with:
name: easy-toggle-settings-artifacts
path: easy-toggle-settings-*.vsix
if-no-files-found: error