Skip to content
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

Update the actions' version #394

Merged
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
91d3422
Upgrade checkout action to v4 across all workflows for improved stabi…
guidomodarelli Nov 4, 2024
21a4cf9
Upgrade Node setup action to v4 in all workflows for consistency and …
guidomodarelli Nov 4, 2024
2142d60
Upgrade cache action to v4 in all workflows for enhanced performance …
guidomodarelli Nov 4, 2024
0415a95
Upgrade upload-artifact action to v4 in all workflows for improved re…
guidomodarelli Nov 4, 2024
1e50383
Upgrade setup-node action to v4 in Cypress workflow for improved reli…
guidomodarelli Nov 4, 2024
0941592
Upgrade download-artifact action to v4 in all workflows for improved …
guidomodarelli Nov 4, 2024
03a1e79
Upgrade github-script action to v7 in Cypress workflow for improved r…
guidomodarelli Nov 4, 2024
6aa8eb3
Upgrade cypress-io/github-action to v7 in Cypress workflow for improv…
guidomodarelli Nov 4, 2024
711c64c
Downgrade cypress-io/github-action to v6 in Cypress workflow to addre…
guidomodarelli Nov 5, 2024
635a2e0
Merge branch '4.10.0' into change/345-use-of-deprecated-actions-on-gh…
guidomodarelli Nov 5, 2024
c3431df
Update Wazuh dashboard workflow: standardize input descriptions and u…
guidomodarelli Nov 5, 2024
5a787e3
Refactor Wazuh dashboard workflow: streamline 'needs' list formatting…
guidomodarelli Nov 5, 2024
4a8d3ed
Add overwrite flag to artifact upload configurations
guidomodarelli Nov 5, 2024
9668c14
Merge branch '4.10.0' into change/345-use-of-deprecated-actions-on-gh…
asteriscos Nov 8, 2024
3007752
Fix changelog
asteriscos Nov 8, 2024
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
42 changes: 23 additions & 19 deletions .github/workflows/build_and_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK (Windows only)
if: matrix.os == 'windows-latest'
Expand All @@ -72,7 +72,7 @@ jobs:
distribution: 'adopt'

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -88,7 +88,7 @@ jobs:
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
uses: actions/cache@v4
if: matrix.os != 'windows-latest'
with:
path: ${{ env.YARN_CACHE_LOCATION }}
Expand Down Expand Up @@ -170,7 +170,7 @@ jobs:
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK (Windows only)
if: matrix.os == 'windows-latest'
Expand All @@ -180,7 +180,7 @@ jobs:
distribution: 'adopt'

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -196,7 +196,7 @@ jobs:
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
uses: actions/cache@v4
if: matrix.os != 'windows-latest'
with:
path: ${{ env.YARN_CACHE_LOCATION }}
Expand Down Expand Up @@ -249,13 +249,14 @@ jobs:
JOB: ci${{ matrix.group }}
CACHE_DIR: ciGroup${{ matrix.group }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failure-artifacts-ci${{ matrix.group }}
path: |
test/*/failure_debug/
test/*/screenshots/
overwrite: true

plugin-functional-tests:
name: Run plugin functional tests on ${{ matrix.name }}
Expand Down Expand Up @@ -286,7 +287,7 @@ jobs:
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup JDK (Windows only)
if: matrix.os == 'windows-latest'
Expand All @@ -296,7 +297,7 @@ jobs:
distribution: 'adopt'

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -312,7 +313,7 @@ jobs:
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
uses: actions/cache@v4
if: matrix.os != 'windows-latest'
with:
path: ${{ env.YARN_CACHE_LOCATION }}
Expand Down Expand Up @@ -360,13 +361,14 @@ jobs:
id: plugin-ftr-tests
run: node scripts/functional_tests.js --config test/plugin_functional/config.ts

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: failure-artifacts-plugin-functional-${{ matrix.os }}
path: |
test/*/failure_debug/
test/*/screenshots/
overwrite: true

build-min-artifact-tests:
name: Build min release artifacts on ${{ matrix.name }}
Expand Down Expand Up @@ -418,12 +420,12 @@ jobs:
disk-root: 'C:'

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ./artifacts

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: './artifacts/.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -439,7 +441,7 @@ jobs:
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
uses: actions/cache@v4
if: matrix.os != 'windows-latest'
with:
path: ${{ env.YARN_CACHE_LOCATION }}
Expand Down Expand Up @@ -473,12 +475,13 @@ jobs:
- name: Build `${{ matrix.name }}`
run: yarn ${{ matrix.script }} --release

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: ${{ matrix.suffix }}-${{ env.VERSION }}
path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }}
retention-days: 1
overwrite: true

bwc-tests:
needs: [build-min-artifact-tests]
Expand Down Expand Up @@ -507,15 +510,15 @@ jobs:
]
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
path: ./artifacts

- run: echo Running backwards compatibility tests for version ${{ matrix.version }}
- run: echo [NOTE] These tests will be ran using Linux x64 release builds without security

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: './artifacts/.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -550,7 +553,7 @@ jobs:
run: echo "BWC_VERSIONS=${{ matrix.version }}" >> $GITHUB_ENV

- name: Download OpenSearch Dashboards
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
id: download
with:
name: linux-x64-${{ env.VERSION }}
Expand All @@ -562,7 +565,7 @@ jobs:
run: |
yarn test:bwc -s false -o ${{ env.OPENSEARCH_URL }} -d ${{ steps.download.outputs.download-path }}/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz -v ${{ matrix.version }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.verify-opensearch-exists.outputs.version-exists == 'true' }}
with:
name: ${{ matrix.version }}-test-failures
Expand All @@ -571,3 +574,4 @@ jobs:
./artifacts/bwc_tmp/test/cypress/screenshots/*
./artifacts/bwc_tmp/test/cypress/results/*
retention-days: 1
overwrite: true
7 changes: 4 additions & 3 deletions .github/workflows/build_base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
ref: ${{ inputs.CHECKOUT_TO }}

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: './artifacts/.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -54,7 +54,7 @@ jobs:
run: echo "YARN_CACHE_LOCATION=$(yarn cache dir)" >> $GITHUB_ENV

- name: Initialize Yarn Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.YARN_CACHE_LOCATION }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
Expand Down Expand Up @@ -85,9 +85,10 @@ jobs:
- name: Rename artifact
run: mv /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/opensearch-dashboards-${{ env.VERSION }}-linux-${{ matrix.ARCHITECTURE }}.${{ matrix.DISTRIBUTION }} /home/runner/work/wazuh-dashboard/wazuh-dashboard/artifacts/target/${{ env.ARTIFACT_BUILD_NAME }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: ${{ env.ARTIFACT_BUILD_NAME }}
path: ./artifacts/target/${{ env.ARTIFACT_BUILD_NAME }}
retention-days: 30
overwrite: true
8 changes: 4 additions & 4 deletions .github/workflows/build_wazuh_dashboard_with_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,25 +205,25 @@ jobs:
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'

- name: Download dashboard artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ needs.setup-variables.outputs.WAZUH_DASHBOARD_SLIM }}
path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/dashboard

- name: Download security plugin artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ needs.setup-variables.outputs.WAZUH_SECURITY_PLUGIN }}
path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/security-plugin

- name: Download plugins artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ needs.setup-variables.outputs.WAZUH_PLUGINS }}
path: ${{ needs.setup-variables.outputs.CURRENT_DIR }}/artifacts/plugins
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/cypress_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
- name: Get source information from PR number
if: ${{ github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }}
id: get_pr_info
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
const { data: result } = await github.rest.pulls.get({
Expand All @@ -82,13 +82,13 @@ jobs:
echo "SOURCE_BRANCH=${{ steps.get_pr_info.outputs.head_ref }}" >> $GITHUB_ENV

- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: ${{ env.SOURCE_REPO }}
ref: '${{ env.SOURCE_BRANCH }}'

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
Expand All @@ -105,7 +105,7 @@ jobs:
run: node scripts/build_opensearch_dashboards_platform_plugins --no-examples --workers 12

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
path: ${{ env.FTR_PATH }}
repository: ${{ env.TEST_REPO }}
Expand Down Expand Up @@ -135,7 +135,7 @@ jobs:

- name: Cache Cypress
id: cache-cypress
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.cache/Cypress
key: cypress-cache-v2-${{ runner.os }}-${{ hashFiles('**/package.json') }}
Expand All @@ -145,34 +145,37 @@ jobs:
- run: npx cypress cache path

- name: Run tests
uses: cypress-io/github-action@v2
uses: cypress-io/github-action@v6
with:
working-directory: ${{ env.FTR_PATH }}
start: ${{ env.OPENSEARCH_SNAPSHOT_CMD }}, ${{ env.START_CMD }}
wait-on: 'http://localhost:9200, http://localhost:5601'
command: yarn cypress:run-without-security --browser ${{ env.CYPRESS_BROWSER }} --config ignoreTestFiles="dashboard_sanity_test_spec.js" --spec ${{ env.SPEC }}

# Screenshots are only captured on failure, will change this once we do visual regression tests
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: ftr-cypress-screenshots
path: ${{ env.FTR_PATH }}/cypress/screenshots
retention-days: 1
overwrite: true

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: ftr-cypress-videos
path: ${{ env.FTR_PATH }}/cypress/videos
retention-days: 1
overwrite: true

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
with:
name: ftr-cypress-results
path: ${{ env.FTR_PATH }}/cypress/results
retention-days: 1
overwrite: true
add-comment:
needs: [cypress-tests]
if: ${{ always() && github.event_name == 'workflow_dispatch' && inputs.pr_number != '' }}
Expand Down
Loading