Skip to content

Commit

Permalink
chore: enable nightly run file verification (#3063)
Browse files Browse the repository at this point in the history
This PR moves the
`.github/workflows/write_read_roundtrip_test/action.yml` to
`.github/workflows/file_verification.yml` to enable it to be `github
action triggered`.

This PR also enables nightly run file verification workflow and renames
a directory
  • Loading branch information
broccoliSpicy authored Oct 29, 2024
1 parent 270cab3 commit 9e18322
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 49 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Lance File Write Read Round Trip Verification
on:

on:
workflow_dispatch:

jobs:
run:
runs-on: "ubuntu-24.04"

runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -20,23 +20,13 @@ jobs:
sudo apt update
sudo apt install -y protobuf-compiler
- name: Check AWS_ACCESS_KEY_ID
- name: Validate AWS Credentials
run: |
if [ -z "${{ secrets.LANCEDB_S3_READER_ACCESS_KEY }}" ]; then
echo "AWS_ACCESS_KEY_ID is not set"
if [ -z "${{ secrets.LANCEDB_S3_READER_ACCESS_KEY }}" ] || [ -z "${{ secrets.LANCEDB_S3_READER_SECRET }}" ]; then
echo "ERROR: AWS credentials are not properly set"
exit 1
else
echo "AWS_ACCESS_KEY_ID is set"
fi
- name: Check AWS_SECRET_ACCESS_KEY
run: |
if [ -z "${{ secrets.LANCEDB_S3_READER_SECRET }}" ]; then
echo "AWS_SECRET_ACCESS_KEY is not set"
exit 1
else
echo "AWS_SECRET_ACCESS_KEY is set"
fi
echo "AWS credentials validation successful"
- name: Set up AWS CLI
uses: aws-actions/configure-aws-credentials@v3
Expand All @@ -45,22 +35,13 @@ jobs:
aws-secret-access-key: ${{ secrets.LANCEDB_S3_READER_SECRET }}
aws-region: us-east-2

- name: List files in S3 bucket
- name: Prepare Test Environment
run: |
BUCKET_NAME="lance-ci-bucket"
mkdir -p .github/workflows/write_read_roundtrip_test/test_files
aws s3 ls s3://$BUCKET_NAME
- name: Download files from S3 bucket
working-directory: .github/workflows/write_read_roundtrip_test
run: |
BUCKET_NAME="lance-ci-bucket"
mkdir test_files
aws s3 cp s3://$BUCKET_NAME ./test_files --recursive
- name: List files Downloaded
working-directory: .github/workflows/write_read_roundtrip_test/test_files
run: |
ls -l
aws s3 cp s3://$BUCKET_NAME .github/workflows/write_read_roundtrip_test/test_files --recursive
ls -l .github/workflows/write_read_roundtrip_test/test_files
- name: Build Lance
working-directory: ./python
Expand All @@ -75,8 +56,9 @@ jobs:
source python/venv/bin/activate
cd .github/workflows/write_read_roundtrip_test
python test_write_read.py
- name: Cleanup
run: |
rm -rf ./.github/workflows/write_read_roundtrip_test/test_files
echo "Cleanup completed: Deleted downloaded files."
rm -rf .github/workflows/write_read_roundtrip_test/test_files
echo "Cleanup completed: Test files removed"
31 changes: 15 additions & 16 deletions .github/workflows/nightly_run.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
# name: Nightly Run Jobs
name: Nightly Run Jobs

# on:
# schedule:
# - cron: '0 0 * * *' # Runs every day at midnight UTC
# workflow_dispatch:
on:
schedule:
- cron: '0 0 * * *' # Runs every day at midnight UTC
workflow_dispatch:

# jobs:
# trigger-file-verification:
# runs-on: ubuntu-24.04

# steps:
# - name: Nightly Run File Verification Workflow
# uses: benc-uk/workflow-dispatch@v1
# with:
# workflow: Lance File Write Read Round Trip Verification
# ref: main
# token: ${{ secrets.GITHUB_TOKEN }}
jobs:
run:
runs-on: ubuntu-24.04
steps:
- name: Nightly Run File Verification Workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: file_verification.yml
ref: main
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9e18322

Please sign in to comment.