Skip to content

Commit

Permalink
fix security issue for int conversion; run sanity tests always
Browse files Browse the repository at this point in the history
  • Loading branch information
amold1 committed Oct 1, 2024
1 parent 6b98fa2 commit 6df1be9
Show file tree
Hide file tree
Showing 4 changed files with 257 additions and 189 deletions.
4 changes: 0 additions & 4 deletions .github/filters.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Any file that is not a doc *.md file
src:
- "!**/**.md"
sanity:
- "**/**.go"
- "go.mod"
- "go.sum"
142 changes: 141 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
slug: linode/linode-blockstorage-csi-driver
e2e-tests:
create-cluster:
runs-on: ubuntu-latest
needs: changes
if: ${{ contains(fromJSON(needs.changes.outputs.paths), 'src') }}
Expand Down Expand Up @@ -95,17 +95,157 @@ jobs:
- name: Setup CAPL Management Kind Cluster and CAPL Child Cluster For Testing
run: devbox run mgmt-and-capl-cluster

e2e-tests:
runs-on: ubuntu-latest
needs: create-cluster
if: ${{ contains(fromJSON(needs.changes.outputs.paths), 'src') }}
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
IMAGE_VERSION: ${{ github.ref == 'refs/heads/main' && 'latest' || format('pr-{0}', github.event.number) || github.ref_name }}
LINODE_REGION: us-sea
LINODE_CONTROL_PLANE_MACHINE_TYPE: g6-standard-2
LINODE_MACHINE_TYPE: g6-standard-2
WORKER_NODES: ${{ github.ref == 'refs/heads/main' && '3' || '1' }}
steps:
- name: Install cryptsetup
run: |
sudo apt install libcryptsetup12 libcryptsetup-dev
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install devbox
uses: jetify-com/[email protected]

- name: Run E2E Tests
run: devbox run e2e-test

sanity-tests:
runs-on: ubuntu-latest
needs: create-cluster
if: ${{ contains(fromJSON(needs.changes.outputs.paths), 'src') }}
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
IMAGE_VERSION: ${{ github.ref == 'refs/heads/main' && 'latest' || format('pr-{0}', github.event.number) || github.ref_name }}
LINODE_REGION: us-sea
LINODE_CONTROL_PLANE_MACHINE_TYPE: g6-standard-2
LINODE_MACHINE_TYPE: g6-standard-2
WORKER_NODES: ${{ github.ref == 'refs/heads/main' && '3' || '1' }}
steps:
- name: Install cryptsetup
run: |
sudo apt install libcryptsetup12 libcryptsetup-dev
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install devbox
uses: jetify-com/[email protected]

- name: Run CSI-Sanity Tests
if: ${{ contains(fromJSON(needs.changes.outputs.paths), 'sanity') }}
run: devbox run csi-sanity-test

upstream-e2e-tests:
runs-on: ubuntu-latest
needs: create-cluster
if: ${{ contains(fromJSON(needs.changes.outputs.paths), 'src') }}
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
IMAGE_VERSION: ${{ github.ref == 'refs/heads/main' && 'latest' || format('pr-{0}', github.event.number) || github.ref_name }}
LINODE_REGION: us-sea
LINODE_CONTROL_PLANE_MACHINE_TYPE: g6-standard-2
LINODE_MACHINE_TYPE: g6-standard-2
WORKER_NODES: ${{ github.ref == 'refs/heads/main' && '3' || '1' }}
steps:
- name: Install cryptsetup
run: |
sudo apt install libcryptsetup12 libcryptsetup-dev
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install devbox
uses: jetify-com/[email protected]

- name: run upstream E2E Tests
if: github.ref == 'refs/heads/main'
run: devbox run upstream-e2e-tests

cleanup:
runs-on: ubuntu-latest
needs: create-cluster
if: ${{ contains(fromJSON(needs.changes.outputs.paths), 'src') }}
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
LINODE_TOKEN: ${{ secrets.LINODE_TOKEN }}
IMAGE_VERSION: ${{ github.ref == 'refs/heads/main' && 'latest' || format('pr-{0}', github.event.number) || github.ref_name }}
LINODE_REGION: us-sea
LINODE_CONTROL_PLANE_MACHINE_TYPE: g6-standard-2
LINODE_MACHINE_TYPE: g6-standard-2
WORKER_NODES: ${{ github.ref == 'refs/heads/main' && '3' || '1' }}
steps:
- name: Install cryptsetup
run: |
sudo apt install libcryptsetup12 libcryptsetup-dev
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
check-latest: true

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Install devbox
uses: jetify-com/[email protected]

- name: Cleanup Resources
if: always()
run: devbox run cleanup-cluster
Loading

0 comments on commit 6df1be9

Please sign in to comment.