Skip to content

Commit

Permalink
add dist (#78)
Browse files Browse the repository at this point in the history
* add dist

* feat: add test back

* feat: add test back

* feat: add test back

* feat: add test back

* feat: add test back

* feat: add test back

* feat: add test back
  • Loading branch information
loispostula authored Nov 1, 2024
1 parent c353697 commit b95240c
Show file tree
Hide file tree
Showing 7 changed files with 4,367 additions and 712 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ jobs:
steps:
- uses: actions/checkout@v4


- name: Set Node.js 20.x
uses: actions/setup-node@v4.0.1
- name: Set Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22
cache: npm

- name: Install dependencies
Expand Down
28 changes: 2 additions & 26 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,6 @@ on:
pull_request:

jobs:
# unit tests
units:
name: Test Javascript
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set Node.js 16.x
uses: actions/setup-node@v4.0.2
with:
node-version: 16.x
cache: npm

- name: Install Dependencies
run: npm ci

- name: Run Lint Test
run: npm run lint

# - name: Run tests
# run: npm test

e2e:
name: Test fslabscli Github Action
runs-on: ubuntu-latest
Expand All @@ -37,8 +15,6 @@ jobs:

- name: Install Updatecli
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Test local action without install-only
run: fslabscli generate-release-workflow --output .github/workflows/release.yml
- name: Get fslabscli version
run: fslabscli --version
833 changes: 161 additions & 672 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

20 changes: 16 additions & 4 deletions dist/licenses.txt
Original file line number Diff line number Diff line change
Expand Up @@ -604,13 +604,25 @@ uuid
MIT
The MIT License (MIT)

Copyright (c) 2010-2020 Robert Kieffer and other contributors
Copyright (c) 2010-2016 Robert Kieffer and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


wrappy
Expand Down
12 changes: 7 additions & 5 deletions tests/main.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ const actionYaml = yaml.load(
await fs.readFile(path.join(directory, '../action.yaml'))
)
const version = actionYaml.inputs.version.default
const versionWithoutV = version.slice(1)
const versionWithoutV = version.startsWith('v') ? version.slice(1) : version

process.env['INPUT_VERSION'] = version
process.env['INPUT_TOKEN'] = process.env.GITHUB_TOKEN

const originalPlatform = process.platform
const originalArch = process.arch

Expand All @@ -46,10 +48,10 @@ describe('main', () => {
await run()
const file = path.join(
cachePath,
'fslabscli',
'cargo-fslabscli',
versionWithoutV,
process.arch,
'fslabscli'
'cargo-fslabscli'
)
const fileStat = await fs.stat(file)
expect(fileStat.isFile()).toBe(true)
Expand Down Expand Up @@ -87,10 +89,10 @@ describe('main', () => {
await fslabscliDownload()
const file = path.join(
cachePath,
'fslabscli',
'cargo-fslabscli',
versionWithoutV,
process.arch,
'fslabscli'
'cargo-fslabscli'
)
const fileStat = await fs.stat(file)
expect(fileStat.isFile()).toBe(true)
Expand Down
Loading

0 comments on commit b95240c

Please sign in to comment.