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 6 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 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@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 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

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 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 }}

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@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 }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
20.15.1
6 changes: 0 additions & 6 deletions components/map/google/demo/package.json

This file was deleted.

7 changes: 1 addition & 6 deletions components/map/google/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@
"description": "",
"main": "lib/index.js",
"scripts": {
"prepare": "npm run build:js && npm run build:styles",
"prepublishOnly": "rm -Rf ./lib && mkdir -p ./lib && npm run build:js && npm run build:styles",
"build:js": "babel --presets sui ./src --out-dir ./lib",
"build:styles": "cpx './src/**/*.scss' ./lib"
},
"sideEffects": false,
"peerDependencies": {
"@s-ui/theme": "8"
},
"repository": {
"type": "git",
"url": "https://github.com/SUI-Components/adevinta-spain-components.git"
},
"keywords": [],
"author": "",
"license": "MIT",
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"lint:js": "sui-lint js",
"lint:sass": "sui-lint sass",
"lint": "npm run lint:js && npm run lint:sass",
"phoenix:ci": "npm run phoenix",
"phoenix": "npx @s-ui/mono@2 phoenix && npx -y ultra-runner --raw --recursive prepublishOnly &>/dev/null",
"phoenix:ci": "npx @s-ui/mono@2 phoenix && npx -y ultra-runner --raw --recursive prepublishOnly &>/dev/null",
"phoenix": "npx @s-ui/mono@2 phoenix && npx -y ultra-runner --raw --recursive prepublishOnly",
"pre-commit": "sui-precommit run",
"start": "sui-studio start",
"test:jest": "jest",
Expand All @@ -33,7 +33,7 @@
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/plugin-transform-modules-commonjs": "7.16.8",
"@babel/plugin-transform-modules-commonjs": "7.24.8",
"@s-ui/documentation-library": "1",
"@s-ui/js-compiler": "1",
"@s-ui/lint": "4",
Expand All @@ -53,7 +53,7 @@
"@s-ui/react-primitive-injector": "^1.2.0"
},
"overrides": {
"@babel/traverse": "7.22.6"
"@babel/traverse": "7.25.6"
},
"config": {
"sui-studio": {
Expand Down Expand Up @@ -87,4 +87,4 @@
"stylelint": {
"extends": "./node_modules/@s-ui/lint/stylelint.config.js"
}
}
}
Loading