From a8b2afe857f2734d1d183f7adf5a3c1ca04a5b52 Mon Sep 17 00:00:00 2001 From: robkeevil Date: Sat, 10 Feb 2024 10:36:56 +0100 Subject: [PATCH] fix unit tests --- .github/workflows/release.yaml | 8 ++++---- .github/workflows/test.yaml | 6 +++--- go.mod | 2 +- go.sum | 4 ++-- scripts/run-unit-tests.sh | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3826918..d81b1b6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -11,15 +11,15 @@ permissions: jobs: test: name: Run test suite - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build and run tests run: make run-tests release: name: Release pushed tag - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Create release env: @@ -29,4 +29,4 @@ jobs: gh release create "$tag" \ --repo="$GITHUB_REPOSITORY" \ --title="${GITHUB_REPOSITORY#*/} ${tag#v}" \ - --generate-notes \ No newline at end of file + --generate-notes diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 587aa3a..a645b2a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,9 +8,9 @@ permissions: jobs: test: name: Run test suite - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Build and run tests - run: make run-tests \ No newline at end of file + run: make run-tests diff --git a/go.mod b/go.mod index 64cda2b..ca733d3 100644 --- a/go.mod +++ b/go.mod @@ -13,7 +13,7 @@ require ( require ( cloud.google.com/go/storage v1.37.0 // indirect - github.com/aws/aws-sdk-go v1.50.14 // indirect + github.com/aws/aws-sdk-go v1.50.15 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-errors/errors v1.5.1 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect diff --git a/go.sum b/go.sum index 526f958..416754b 100644 --- a/go.sum +++ b/go.sum @@ -8,8 +8,8 @@ cloud.google.com/go/iam v1.1.5 h1:1jTsCu4bcsNsE4iiqNT5SHwrDRCfRmIaaaVFhRveTJI= cloud.google.com/go/iam v1.1.5/go.mod h1:rB6P/Ic3mykPbFio+vo7403drjlgvoWfYpJhMXEbzv8= cloud.google.com/go/storage v1.37.0 h1:WI8CsaFO8Q9KjPVtsZ5Cmi0dXV25zMoX0FklT7c3Jm4= cloud.google.com/go/storage v1.37.0/go.mod h1:i34TiT2IhiNDmcj65PqwCjcoUX7Z5pLzS8DEmoiFq1k= -github.com/aws/aws-sdk-go v1.50.14 h1:m1bxKtd1lJpNnl+Owah0+UPRuS9f3GFvxBPgc8RiodE= -github.com/aws/aws-sdk-go v1.50.14/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= +github.com/aws/aws-sdk-go v1.50.15 h1:wEMnPfEQQFaoIJwuO18zq/vtG4Ft7NxQ3r9xlEi/8zg= +github.com/aws/aws-sdk-go v1.50.15/go.mod h1:LF8svs817+Nz+DmiMQKTO3ubZ/6IaTpq3TjupRn3Eqk= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= diff --git a/scripts/run-unit-tests.sh b/scripts/run-unit-tests.sh index d355300..61715d9 100755 --- a/scripts/run-unit-tests.sh +++ b/scripts/run-unit-tests.sh @@ -15,9 +15,9 @@ echo "Downloading the models required for testing from the huggingface hub" if [[ ! -d "$src_dir/models" ]]; then mkdir -p $src_dir/models - (cd $src_dir/models && git clone https://huggingface.co/KnightsAnalytics/all-MiniLM-L6-v2 &&\ + (cd $src_dir/models && git clone https://huggingface.co/KnightsAnalytics/all-MiniLM-L6-v2 && \ git clone https://huggingface.co/KnightsAnalytics/distilbert-base-uncased-finetuned-sst-2-english && \ - git clone git clone https://huggingface.co/KnightsAnalytics/distilbert-NER) + git clone https://huggingface.co/KnightsAnalytics/distilbert-NER) fi # build with compose @@ -28,4 +28,4 @@ echo "Running tests for commit hash: $commit_hash" docker compose -f $src_dir/.ci/docker-compose.yaml up && \ docker compose -f $src_dir/.ci/docker-compose.yaml logs --no-color >& $test_folder/logs.txt && \ -docker compose -f $src_dir/.ci/docker-compose.yaml rm -fsv \ No newline at end of file +docker compose -f $src_dir/.ci/docker-compose.yaml rm -fsv