Files
setup-ossutil/.github/workflows/test.yml
Rimo 7771e4ad5d Download ossutil from CDN endpoint (#30)
* use cdn to download

* set default version to 1.7.14

* schedule daily test

* bump up version 1.1.1

* use 'latest' in CI test
2022-09-28 22:49:06 +08:00

48 lines
1.3 KiB
YAML

name: "build-test"
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- master
schedule:
- cron: '0 0 * * *'
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- run: npm run all
- name: Compare the expected and actual dist
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
id: diff
- name: upload the expected dist
uses: actions/upload-artifact@v3
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
path: dist/
test: # make sure the action works on a clean machine without building
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: ./
with:
ossutil-version: 'latest'
endpoint: ${{ secrets.OSS_ENDPOINT }}
access-key-id: ${{ secrets.OSS_ACCESS_KEY_ID }}
access-key-secret: ${{ secrets.OSS_ACCESS_KEY_SECRET }}
- run: ossutil -v
- run: ossutil ls > /dev/null
shell: bash