use localstack to test aws upload #99
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Go | |
on: | |
push: | |
#pull_request: | |
# types: | |
# - opened | |
# - synchronize | |
# - reopened | |
jobs: | |
# lint: | |
# runs-on: ubuntu-22.04 | |
# container: | |
# image: lomorage/lomo-backup:1.0 | |
# env: | |
# PATH: /bin:/usr/bin:/usr/local/bin:/usr/local/go/bin | |
# GOFLAGS: "-buildvcs=false" | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - run: make lint | |
# | |
# unit-test: | |
# runs-on: ubuntu-22.04 | |
# container: | |
# image: lomorage/lomo-backup:1.0 | |
# env: | |
# PATH: /bin:/usr/bin:/usr/local/bin:/usr/local/go/bin | |
# GOBIN: /usr/local/bin | |
# GOFLAGS: "-buildvcs=false" | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - run: make unit-tests | |
e2e-test: | |
runs-on: ubuntu-22.04 | |
container: | |
image: lomorage/lomo-backup:1.0 | |
env: | |
PATH: /bin:/usr/bin:/usr/local/bin:/usr/local/go/bin | |
GOBIN: /usr/local/bin | |
GOFLAGS: "-buildvcs=false" | |
WORKDIR: /go/src/github.com/lomorage/lomo-backup | |
steps: | |
# - name: Start LocalStack | |
# uses: LocalStack/[email protected] | |
# with: | |
# image-tag: '3.4.0' | |
# install-awslocal: 'true' | |
# configuration: DEBUG=1 | |
# - name: Run Tests against LocalStack | |
# run: | | |
# awslocal s3 mb s3://test | |
# awslocal s3 ls | |
# curl -v localhost:4566 | |
# echo "Test Execution complete!" | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- run: ./dockerfiles/run-localstack.sh | |
- run: cd test/data; find . | while read -r file; do git log -1 --format="%ad" --date=iso "$file" | xargs -t -I{} touch -d {} "$file"; done | |
- run: mkdir -p $WORKDIR; rsync -avz * $WORKDIR/; cd $WORKDIR; tree --si -D test/data/ | |
- run: cd $WORKDIR; make install | |
- run: cd $WORKDIR; make e2e-tests |