Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jfantinhardesty committed Sep 13, 2023
1 parent 77f7b2b commit 65ae010
Showing 1 changed file with 48 additions and 7 deletions.
55 changes: 48 additions & 7 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:

runs-on: ${{ matrix.os }}
env:
MOUNT_DIR: "${{ github.workspace }}/blob_mnt"
ROOT_DIR: "${{ github.workspace }}"
TEMP_DIR: "${{ github.workspace }}/cloudfuse_tmp"
MOUNT_DIR: "${{ github.workspace }}/tmp/blob_mnt"
ROOT_DIR: "${{ github.workspace }}/tmp"
TEMP_DIR: "${{ github.workspace }}/tmp/cloudfuse_tmp"
WORK_DIR: "."
cloudfuse_ADLS_CFG: "./cloudfuse.adls.yaml"
cloudfuse_CFG: "./cloudfuse.yaml"
Expand Down Expand Up @@ -58,10 +58,6 @@ jobs:
sudo chown -R `whoami` ${{ env.ROOT_DIR }}
chmod 777 ${{ env.ROOT_DIR }}
- name: Build
run: |
./build.sh
- name: Go module cache
uses: actions/cache@v3
with:
Expand All @@ -70,6 +66,51 @@ jobs:
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
run: |
./build.sh
- name: Create Azure Configuration File
run: |-
cnfFile=$HOME/azuretest.json
echo $cnfFile
touch $cnfFile
echo "{" > $cnfFile
echo "\"block-acct\"": "\"${{ secrets.AZTEST_BLOCK_ACC_NAME }}\"", >> $cnfFile
echo "\"adls-acct\"": "\"${{ secrets.AZTEST_ADLS_ACC_NAME }}\"", >> $cnfFile
echo "\"block-cont\"": "\"${{ matrix.containerName }}\"", >> $cnfFile
echo "\"adls-cont\"": "\"${{ matrix.containerName }}\"", >> $cnfFile
echo "\"block-key\"": "\"${{ secrets.AZTEST_BLOCK_KEY }}\"", >> $cnfFile
echo "\"adls-key\"": "\"${{ secrets.AZTEST_ADLS_KEY }}\"", >> $cnfFile
echo "\"block-sas\"": "\"${{ secrets.AZTEST_BLOCK_SAS }}\"", >> $cnfFile
echo "\"block-cont-sas-ubn-18\"": "\"${{ secrets.AZTEST_BLOCK_CONT_SAS_UBN_18 }}\"", >> $cnfFile
echo "\"block-cont-sas-ubn-20\"": "\"${{ secrets.AZTEST_BLOCK_CONT_SAS_UBN_20 }}\"", >> $cnfFile
echo "\"adls-sas\"": "\"${{ secrets.AZTEST_ADLS_SAS }}\"", >> $cnfFile
echo "\"msi-appid\"": "\"${{ secrets.AZTEST_APP_ID }}\"", >> $cnfFile
echo "\"msi-resid\"": "\"${{ secrets.AZTEST_RES_ID }}\"", >> $cnfFile
echo "\"msi-objid\"": "\"${{ secrets.AZTEST_OBJ_ID }}\"", >> $cnfFile
echo "\"spn-client\"": "\"${{ secrets.AZTEST_CLIENT }}\"", >> $cnfFile
echo "\"spn-tenant\"": "\"${{ secrets.AZTEST_TENANT }}\"", >> $cnfFile
echo "\"spn-secret\"": "\"${{ secrets.AZTEST_SECRET }}\"", >> $cnfFile
echo "\"skip-msi\"": "true", >> $cnfFile
echo "\"proxy-address\"": "\"\"" >> $cnfFile
echo "}" >> $cnfFile
if: matrix.os == 'ubuntu-latest'

- name: Create S3 Configuration File
run: |-
cnfFile=$HOME/s3test.json
echo $cnfFile
touch $cnfFile
echo "{" > $cnfFile
echo "\"bucket-name\"": "\"${{ env.S3TEST_BUCKET_NAME }}\"", >> $cnfFile
echo "\"access-key\"": "\"${{ env.S3TEST_ACCESS_KEY }}\"", >> $cnfFile
echo "\"secret-key\"": "\"${{ env.S3TEST_SECRET_KEY }}\"", >> $cnfFile
echo "\"endpoint\"": "\"${{ env.S3TEST_ENDPOINT }}\"", >> $cnfFile
echo "\"region\"": "\"${{ env.S3TEST_REGION }}\"" >> $cnfFile
echo "}" >> $cnfFile
if: matrix.os == 'ubuntu-latest'

- name: UT Code Coverage
run: go test -v -timeout=1h ./... --tags=unittest,storagetest -covermode count -coverprofile ./cloudfuse_ut.cov
Expand Down

0 comments on commit 65ae010

Please sign in to comment.