Skip to content

Commit

Permalink
Fix repository tests (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tostti authored Apr 12, 2024
1 parent e32d695 commit 18efe34
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 755 deletions.
76 changes: 44 additions & 32 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ name: Build and test
# trigger on every commit push and PR for all branches except feature branches and pushes for backport branches
on:
push:
branches: [ '**', '!feature/**', '!backport/**' ]
branches: ['**', '!feature/**', '!backport/**']
paths-ignore:
- '**/*.md'
- 'docs/**'
pull_request:
branches: [ '**', '!feature/**' ]
branches: ['**', '!feature/**']
paths-ignore:
- '**/*.md'
- 'docs/**'
Expand All @@ -25,21 +25,21 @@ env:
TEST_OPENSEARCH_TRANSPORT_PORT: 9403
TEST_OPENSEARCH_PORT: 9400
OSD_SNAPSHOT_SKIP_VERIFY_CHECKSUM: true
NODE_OPTIONS: "--max-old-space-size=6144 --dns-result-order=ipv4first"
NODE_OPTIONS: '--max-old-space-size=6144 --dns-result-order=ipv4first'

jobs:
build-lint-test:
name: Build and Verify on ${{ matrix.name }} (ciGroup${{ matrix.group }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest] #Removed 'windows-latest'
group: [1, 2, 3, 4]
include:
- os: ubuntu-latest
name: Linux
- os: windows-latest
name: Windows
# - os: windows-latest
# name: Windows
runs-on: ${{ matrix.os }}
steps:
- name: Configure git's autocrlf (Windows only)
Expand All @@ -53,7 +53,7 @@ jobs:
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: "C:"
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -138,13 +138,13 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest] #Removed 'windows-latest'
group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
include:
- os: ubuntu-latest
name: Linux
- os: windows-latest
name: Windows
# - os: windows-latest
# name: Windows
runs-on: ${{ matrix.os }}
steps:
- run: echo Running functional tests for ciGroup${{ matrix.group }}
Expand All @@ -160,7 +160,7 @@ jobs:
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: "C:"
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -233,12 +233,12 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-latest] #Removed 'windows-latest'
include:
- os: ubuntu-latest
name: Linux
- os: windows-latest
name: Windows
# - os: windows-latest
# name: Windows
runs-on: ${{ matrix.os }}
steps:
- run: echo Running plugin functional tests
Expand All @@ -254,7 +254,7 @@ jobs:
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: "C:"
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -332,21 +332,21 @@ jobs:
ext: tar.gz
suffix: linux-arm64
script: build-platform --linux-arm --skip-os-packages
- os: macos-latest
name: macOS x64
ext: tar.gz
suffix: darwin-x64
script: build-platform --darwin --skip-os-packages
- os: macos-latest
name: macOS ARM64
ext: tar.gz
suffix: darwin-arm64
script: build-platform --darwin-arm --skip-os-packages
- os: windows-latest
name: Windows x64
ext: zip
suffix: windows-x64
script: build-platform --windows --skip-os-packages
# - os: macos-latest
# name: macOS x64
# ext: tar.gz
# suffix: darwin-x64
# script: build-platform --darwin --skip-os-packages
# - os: macos-latest
# name: macOS ARM64
# ext: tar.gz
# suffix: darwin-arm64
# script: build-platform --darwin-arm --skip-os-packages
# - os: windows-latest
# name: Windows x64
# ext: zip
# suffix: windows-x64
# script: build-platform --windows --skip-os-packages
runs-on: ${{ matrix.os }}
defaults:
run:
Expand All @@ -364,7 +364,7 @@ jobs:
with:
minimum-size: 16GB
maximum-size: 64GB
disk-root: "C:"
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -441,7 +441,19 @@ jobs:
working-directory: ./artifacts
strategy:
matrix:
version: [osd-2.0.0, osd-2.1.0, osd-2.2.0, osd-2.3.0, osd-2.4.0, osd-2.5.0, osd-2.6.0, osd-2.7.0, osd-2.8.0, osd-2.9.0]
version:
[
osd-2.0.0,
osd-2.1.0,
osd-2.2.0,
osd-2.3.0,
osd-2.4.0,
osd-2.5.0,
osd-2.6.0,
osd-2.7.0,
osd-2.8.0,
osd-2.9.0,
]
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cypress_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Run cypress tests
# trigger on every PR for all branches except feature branches
on:
pull_request:
branches: [ '**', '!feature/**' ]
branches: ['**', '!feature/**']
paths-ignore:
- '**/*.md'
workflow_dispatch:
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
strategy:
fail-fast: false
matrix:
group: [1, 2, 3, 4, 5, 6, 7, 8, 9]
group: [1, 2, 3, 4, 5]
container:
image: docker://opensearchstaging/ci-runner:ci-runner-rockylinux8-opensearch-dashboards-integtest-v2
options: --user 1001
Expand Down Expand Up @@ -184,7 +184,7 @@ jobs:
with:
issue-number: ${{ inputs.pr_number }}
comment-author: 'github-actions[bot]'
body-includes: "${{ env.COMMENT_TAG }}"
body-includes: '${{ env.COMMENT_TAG }}'

- name: Add comment on the PR
uses: peter-evans/create-or-update-comment@v3
Expand Down
12 changes: 0 additions & 12 deletions packages/osd-plugin-helpers/src/integration_tests/build.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,9 @@ it('builds a generated plugin into a viable archive', async () => {
info running @osd/optimizer
│ info initialized, 0 bundles cached
│ info starting worker [1 bundle]
│ warn worker stderr Browserslist: caniuse-lite is outdated. Please run:
│ warn worker stderr npx update-browserslist-db@latest
│ warn worker stderr Why you should do it regularly: https://github.com/browserslist/update-db#readme
│ succ 1 bundles compiled successfully after <time>
info copying assets from \`public/assets\` to build
info copying server source into the build and converting with babel
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
info running yarn to install dependencies
info compressing plugin into [fooTestPlugin-1.0.0.zip]
info cleaning up compression temporary artifacts"
Expand Down Expand Up @@ -195,15 +189,9 @@ it('builds a non-semver generated plugin into a viable archive', async () => {
info running @osd/optimizer
│ info initialized, 0 bundles cached
│ info starting worker [1 bundle]
│ warn worker stderr Browserslist: caniuse-lite is outdated. Please run:
│ warn worker stderr npx update-browserslist-db@latest
│ warn worker stderr Why you should do it regularly: https://github.com/browserslist/update-db#readme
│ succ 1 bundles compiled successfully after <time>
info copying assets from \`public/assets\` to build
info copying server source into the build and converting with babel
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
info running yarn to install dependencies
info compressing plugin into [fooTestPlugin-1.0.0.x.zip]
info cleaning up compression temporary artifacts"
Expand Down
50 changes: 25 additions & 25 deletions src/plugins/home/public/application/components/home_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,35 +52,35 @@ export function HomeApp({ directories, solutions }) {
savedObjectsClient,
getBasePath,
addBasePath,
environmentService,
// environmentService,
telemetry,
uiSettings,
} = getServices();
const environment = environmentService.getEnvironment();
const isCloudEnabled = environment.cloud;
// const environment = environmentService.getEnvironment();
// const isCloudEnabled = environment.cloud;

const renderTutorialDirectory = (props) => {
return (
<TutorialDirectory
addBasePath={addBasePath}
openTab={props.match.params.tab}
isCloudEnabled={isCloudEnabled}
/>
);
};

const renderTutorial = (props) => {
return (
<Tutorial
addBasePath={addBasePath}
isCloudEnabled={isCloudEnabled}
getTutorial={getTutorial}
replaceTemplateStrings={replaceTemplateStrings}
tutorialId={props.match.params.id}
bulkCreate={savedObjectsClient.bulkCreate}
/>
);
};
/* const renderTutorialDirectory = (props) => {
return (
<TutorialDirectory
addBasePath={addBasePath}
openTab={props.match.params.tab}
isCloudEnabled={isCloudEnabled}
/>
);
};
const renderTutorial = (props) => {
return (
<Tutorial
addBasePath={addBasePath}
isCloudEnabled={isCloudEnabled}
getTutorial={getTutorial}
replaceTemplateStrings={replaceTemplateStrings}
tutorialId={props.match.params.id}
bulkCreate={savedObjectsClient.bulkCreate}
/>
);
}; */

const legacyHome = (
<Home
Expand Down
7 changes: 4 additions & 3 deletions src/plugins/home/public/application/components/legacy/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
import { HOME_APP_BASE_PATH } from '../../../../common/constants';
import { FeatureCatalogueCategory } from '../../../services';
import { getServices } from '../../opensearch_dashboards_services';
import { AddData } from './add_data';
// import { AddData } from './add_data';
import { ManageData } from './manage_data';
import { NewThemeModal } from '../new_theme_modal';
import { SolutionsSection } from './solutions_section';
Expand Down Expand Up @@ -192,10 +192,11 @@ export class Home extends Component {
) : null}

<EuiFlexGroup
className={`homData ${addDataFeatures.length === 1 && manageDataFeatures.length === 1
className={`homData ${
addDataFeatures.length === 1 && manageDataFeatures.length === 1
? 'homData--compressed'
: 'homData--expanded'
}`}
}`}
>
<EuiFlexItem>
<ManageData addBasePath={addBasePath} features={manageDataFeatures} />
Expand Down
Loading

0 comments on commit 18efe34

Please sign in to comment.