Skip to content

Commit

Permalink
Add GitHub Action to test
Browse files Browse the repository at this point in the history
  • Loading branch information
lambdalisue committed Oct 24, 2024
1 parent 7370515 commit 16c996a
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Test

on: [push]

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- run: docker build .

test:
needs: check

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Basic usage
uses: ./
with:
connection-string: ${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}
container: "azblob-generate-static-index"
prefix: "some"
overwrite: "true"

- name: Check if 'index.html' is correct
run: |
az storage blob download \
--connection-string "${{ secrets.AZURE_STORAGE_CONNECTION_STRING }}" \
--container-name azblob-generate-static-index \
--name some/index.html \
--file index.html.downloaded
grep -q 'hello.txt' index.html.downloaded
grep -q 'world.txt' index.html.downloaded

0 comments on commit 16c996a

Please sign in to comment.