
Pin the Github Action dependencies to the hash according to secure software development best practices recommended by the Open Source Security Foundation (OpenSSF). When developing a CI workflow, it's common to version-pin dependencies (i.e. actions/checkout@v4). However, version tags are mutable, so a malicious attacker could overwrite a version tag to point to a malicious or vulnerable commit instead. Pinning workflow dependencies by hash ensures the dependency is immutable and its behavior is guaranteed. See https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies The `dependabot` supports updating a hash and the version comment so its update will continue to work as before. Links to used actions and theit tag/hash for review/validation: https://github.com/actions/checkout/tags (v4.1.2 was rolled back) https://github.com/github/codeql-action/tags https://github.com/maxim-lobanov/setup-xcode/tags https://github.com/cross-platform-actions/action/releases/tag/v0.22.0 https://github.com/py-actions/py-dependency-install/tags https://github.com/actions/upload-artifact/tags https://github.com/actions/setup-node/tags https://github.com/taiki-e/install-action/releases/tag/v2.32.2 This PR is part of #211. Signed-off-by: Björn Svensson <bjorn.a.svensson@est.tech>
89 lines
3.0 KiB
YAML
89 lines
3.0 KiB
YAML
name: External Server Tests
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
schedule:
|
|
- cron: '0 0 * * *'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test-external-standalone:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'schedule' || github.repository == 'valkey-io/valkey'
|
|
timeout-minutes: 14400
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- name: Build
|
|
run: make SERVER_CFLAGS=-Werror
|
|
- name: Start valkey-server
|
|
run: |
|
|
./src/valkey-server --daemonize yes --save "" --logfile external-server.log \
|
|
--enable-protected-configs yes --enable-debug-command yes --enable-module-command yes
|
|
- name: Run external test
|
|
run: |
|
|
./runtest \
|
|
--host 127.0.0.1 --port 6379 \
|
|
--verbose \
|
|
--tags -slow
|
|
- name: Archive server log
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
|
with:
|
|
name: test-external-standalone-log
|
|
path: external-server.log
|
|
|
|
test-external-cluster:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'schedule' || github.repository == 'valkey-io/valkey'
|
|
timeout-minutes: 14400
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- name: Build
|
|
run: make SERVER_CFLAGS=-Werror
|
|
- name: Start valkey-server
|
|
run: |
|
|
./src/valkey-server --cluster-enabled yes --daemonize yes --save "" --logfile external-server.log \
|
|
--enable-protected-configs yes --enable-debug-command yes --enable-module-command yes
|
|
- name: Create a single node cluster
|
|
run: ./src/valkey-cli cluster addslots $(for slot in {0..16383}; do echo $slot; done); sleep 5
|
|
- name: Run external test
|
|
run: |
|
|
./runtest \
|
|
--host 127.0.0.1 --port 6379 \
|
|
--verbose \
|
|
--cluster-mode \
|
|
--tags -slow
|
|
- name: Archive server log
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
|
with:
|
|
name: test-external-cluster-log
|
|
path: external-server.log
|
|
|
|
test-external-nodebug:
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name != 'schedule' || github.repository == 'valkey-io/valkey'
|
|
timeout-minutes: 14400
|
|
steps:
|
|
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
|
|
- name: Build
|
|
run: make SERVER_CFLAGS=-Werror
|
|
- name: Start valkey-server
|
|
run: |
|
|
./src/valkey-server --daemonize yes --save "" --logfile external-server.log
|
|
- name: Run external test
|
|
run: |
|
|
./runtest \
|
|
--host 127.0.0.1 --port 6379 \
|
|
--verbose \
|
|
--tags "-slow -needs:debug"
|
|
- name: Archive server log
|
|
if: ${{ failure() }}
|
|
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
|
|
with:
|
|
name: test-external-nodebug-log
|
|
path: external-server.log
|