Skip to content

chore(Root): Update Github Workflow #671

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
136 changes: 69 additions & 67 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,91 +10,93 @@ jobs:
check-skip:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Redundant Builds
uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ github.token }}
- name: Cancel Previous Redundant Builds
uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ github.token }}

build:
needs: check-skip
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: |
npm install --legacy-peer-deps --no-audit --no-fund --no-optional && npx -y ultra-runner --raw --recursive prepublishOnly &>/dev/null
npm run lint
npm run build
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/upload-artifact@v2
with:
name: public-folder
path: public
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: |
npm ci --legacy-peer-deps --no-audit --no-fund --no-optional && npx -y ultra-runner --raw --recursive prepublishOnly &>/dev/null
npm run lint
npm run build
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/upload-artifact@v3
with:
name: public-folder
path: public

testing:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- name: Install xvfb for headless testing
run: sudo apt-get install xvfb
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Install xvfb for headless testing
run: sudo apt-get install xvfb

- name: Setup Max User Watches for Testing
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Setup Max User Watches for Testing
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

- name: Testing
run: |
npm install --legacy-peer-deps --no-audit --no-fund --no-optional
npx -y ultra-runner --raw --recursive prepublishOnly &>/dev/null
xvfb-run --auto-servernum npm run test -- --ci
- name: Testing
run: |
npm ci --legacy-peer-deps --no-audit --no-fund --no-optional
npx -y ultra-runner --raw --recursive prepublishOnly &>/dev/null
xvfb-run --auto-servernum npm run test -- --ci

release:
needs: [build, testing]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Release components
run: |
npm install --legacy-peer-deps --no-audit --no-fund --no-optional
npx @s-ui/ci release
env:
GITHUB_EMAIL: cloud-accounts@scmspain.com
GITHUB_TOKEN: ${{github.token}}
GITHUB_USER: sui-bot
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- name: Release components
run: |
npm ci --legacy-peer-deps --no-audit --no-fund --no-optional
npx @s-ui/ci release
env:
GITHUB_EMAIL: cloud-accounts@scmspain.com
GITHUB_TOKEN: ${{github.token}}
GITHUB_USER: sui-bot
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

deploy:
needs: [build, testing]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16
- uses: actions/download-artifact@v2
with:
name: public-folder
- name: Deploy
run: |
npm i -g vercel --no-save --no-fund --no-audit --no-optional --no-scripts
DEPLOYMENT_URL=$(vercel --token $VERCEL_TOKEN --confirm $VERCEL_PARAMS)
env:
VERCEL_PARAMS: ${{ github.event_name != 'pull_request' && '--prod' || ''}}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
- uses: actions/download-artifact@v3
with:
name: public-folder
- name: Deploy
run: |
npm i -g vercel --no-save --no-fund --no-audit --no-optional --no-scripts
DEPLOYMENT_URL=$(vercel --token $VERCEL_TOKEN --confirm $VERCEL_PARAMS)
env:
VERCEL_PARAMS: ${{ github.event_name != 'pull_request' && '--prod' || ''}}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ public/
lib/
npm-debug.log
lib
package-lock.json
.env
.DS_Store
components/package.json
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20.15.1
Loading
Loading