Skip to content

Commit

Permalink
merging main
Browse files Browse the repository at this point in the history
  • Loading branch information
Nina Ciocanu committed May 7, 2024
2 parents 64bd107 + 1e28ab6 commit c2f7104
Show file tree
Hide file tree
Showing 63 changed files with 4,585 additions and 5,962 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -2,12 +2,12 @@ name: "CodeQL"

on:
push:
branches: [ main ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
branches: [main]
schedule:
- cron: '26 7 * * 3'
- cron: "26 7 * * 3"

jobs:
analyze:
Expand All @@ -21,30 +21,30 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ["javascript"]

steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
20 changes: 10 additions & 10 deletions .github/workflows/deployRelease.yml
Expand Up @@ -27,18 +27,18 @@ jobs:
# final release versions do not contain '-'
if: ${{ contains(github.event.inputs.version, '-') == false }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- uses: webfactory/ssh-agent@v0.5.3
node-version: 21
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.ALLOY_BOT_GITHUB_SSH_PRIVATE_KEY }}
- run: ./scripts/deploy.sh ${{ github.event.inputs.version }}
env:
REACTOR_IO_INTEGRATION_PRIVATE_KEY_CONTENTS: ${{ secrets.REACTOR_IO_INTEGRATION_PRIVATE_KEY_CONTENTS }}
REACTOR_IO_INTEGRATION_CLIENT_SECRET: ${{ secrets.REACTOR_IO_INTEGRATION_CLIENT_SECRET }}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: package
path: ./package-adobe-alloy-${{ github.event.inputs.version }}.zip
Expand All @@ -49,18 +49,18 @@ jobs:
# prerelease versions contain '-'
if: ${{ contains(github.event.inputs.version, '-') }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- uses: webfactory/ssh-agent@v0.5.3
node-version: 21
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.ALLOY_BOT_GITHUB_SSH_PRIVATE_KEY }}
- run: ./scripts/deploy.sh ${{ github.event.inputs.version }}
env:
REACTOR_IO_INTEGRATION_PRIVATE_KEY_CONTENTS: ${{ secrets.REACTOR_IO_INTEGRATION_PRIVATE_KEY_CONTENTS }}
REACTOR_IO_INTEGRATION_CLIENT_SECRET: ${{ secrets.REACTOR_IO_INTEGRATION_CLIENT_SECRET }}
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: package
path: ./package-adobe-alloy-${{ github.event.inputs.version }}.zip
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/tests.yml
Expand Up @@ -6,7 +6,7 @@ env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
SAUCE_JOB: "Alloy Reactor Extension"
SAUCE_CAPABILITIES_OVERRIDES_PATH: 'sauceLabsCapabilities.json'
SAUCE_CAPABILITIES_OVERRIDES_PATH: "sauceLabsCapabilities.json"
EDGE_E2E_PRIVATE_KEY_CONTENTS: ${{ secrets.EDGE_E2E_PRIVATE_KEY_CONTENTS }}
EDGE_E2E_CLIENT_SECRET: ${{ secrets.EDGE_E2E_CLIENT_SECRET }}
REACTOR_IO_INTEGRATION_PRIVATE_KEY_CONTENTS: ${{ secrets.REACTOR_IO_INTEGRATION_PRIVATE_KEY_CONTENTS }}
Expand All @@ -17,24 +17,22 @@ jobs:
name: "Unit Test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- uses: saucelabs/sauce-connect-action@v2.2.1
- uses: saucelabs/sauce-connect-action@v2
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelName: ${{ github.job }}
- name: Run Unit Test
run: npx karma start karma.saucelabs.conf.js --single-run
env:
BUILD_NUMBER: ${{ github.run_number }}
BUILD_ID: ${{ github.run_id }}
JOB_NUMBER: ${{ github.job }}


functional-test:
name: "Functional Test"
needs: unit-test
Expand All @@ -50,11 +48,11 @@ jobs:
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2.1.4
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: npm-cache
with:
path: '**/node_modules'
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}-${{ secrets.NPM_CACHE_VERSION }} # increment NPM_CACHE_VERSION secret to force cache reset
- name: Install node packages
run: npm ci
Expand All @@ -70,4 +68,3 @@ jobs:
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
EDGE_E2E_PRIVATE_KEY_CONTENTS: ${{ secrets.EDGE_E2E_PRIVATE_KEY_CONTENTS }}
EDGE_E2E_CLIENT_SECRET: ${{ secrets.EDGE_E2E_CLIENT_SECRET }}

31 changes: 19 additions & 12 deletions eslint.config.js → eslint.config.mjs
Expand Up @@ -10,22 +10,27 @@ OF ANY KIND, either express or implied. See the License for the specific languag
governing permissions and limitations under the License.
*/

const { FlatCompat } = require("@eslint/eslintrc");
const js = require("@eslint/js");
const babelParser = require("@babel/eslint-parser");
const eslintPluginPrettierRecommended = require("eslint-plugin-prettier/recommended");
const globals = require("globals");
import { FlatCompat } from "@eslint/eslintrc";
import path from "path";
import { fileURLToPath } from "url";
import js from "@eslint/js";
import globals from "globals";
import babelParser from "@babel/eslint-parser";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const compat = new FlatCompat({
baseDirectory: __dirname // optional; default: process.cwd()
baseDirectory: __dirname
});

const config = [
export default [
js.configs.recommended,
...compat.extends("airbnb", "plugin:testcafe/recommended"),
...compat.plugins("unused-imports", "ban", "testcafe"),
{
files: ["**/*.{js,jsx}"],
files: ["**/*.{mjs,js,jsx}"],
languageOptions: {
parser: babelParser,
parserOptions: {
Expand Down Expand Up @@ -93,18 +98,22 @@ const config = [
components: []
}
],
"no-underscore-dangle": [2, { allow: ["_experience"] }],
"no-underscore-dangle": [
2,
{ allow: ["_experience", "__dirname", "__filename"] }
],
"react/jsx-props-no-spreading": "off",
"react/function-component-definition": [
2,
{ namedComponents: "arrow-function" }
],

"import/no-named-as-default-member": "off",
"import/no-named-as-default": "off"
}
},
{
files: ["src/**/*.{js,jsx}"],
files: ["src/**/*.{mjs,js,jsx}"],
languageOptions: {
globals: {
_satellite: "readonly"
Expand Down Expand Up @@ -135,5 +144,3 @@ const config = [

eslintPluginPrettierRecommended
];

module.exports = config;

0 comments on commit c2f7104

Please sign in to comment.