|
| 1 | +name: Test |
| 2 | + |
| 3 | +on: push |
| 4 | + |
| 5 | +env: |
| 6 | + NODE_VERSION: "16.x" |
| 7 | + |
| 8 | +jobs: |
| 9 | + test: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + steps: |
| 12 | + - uses: actions/checkout@v3 |
| 13 | + - name: Setup Node.js ${{ env.NODE_VERSION }} |
| 14 | + uses: actions/setup-node@v3 |
| 15 | + with: |
| 16 | + node-version: ${{ env.NODE_VERSION }} |
| 17 | + cache: yarn |
| 18 | + - run: yarn install --immutable |
| 19 | + - run: yarn test |
| 20 | + - run: yarn format-check |
| 21 | + - run: yarn lint |
| 22 | + |
| 23 | + functional-test: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v3 |
| 27 | + - name: "Test API calls" |
| 28 | + uses: ./ |
| 29 | + id: test-run |
| 30 | + with: |
| 31 | + debug: true |
| 32 | + output_file: './test-out.txt' |
| 33 | + - name: "Validate output" |
| 34 | + env: |
| 35 | + LATEST: "${{ steps.test-run.outputs.latest_rc_or_nightly }}" |
| 36 | + RELEASE: "${{ steps.test-run.outputs.release }}" |
| 37 | + RC: "${{ steps.test-run.outputs.rc }}" |
| 38 | + NIGHTLY: "${{ steps.test-run.outputs.nightly }}" |
| 39 | + RELEASE_NIGHTLY: "${{ steps.test-run.outputs.release_nightly }}" |
| 40 | + run: | |
| 41 | + echo "::notice:: Latest: $LATEST" |
| 42 | + echo "::notice:: Release: $RELEASE" |
| 43 | + echo "::notice:: RC: $RC" |
| 44 | + echo "::notice:: Nightly: $NIGHTLY" |
| 45 | + echo "::notice:: Release Nightly: $RELEASE_NIGHTLY" |
| 46 | +
|
| 47 | + touch test-out.txt # just in case |
| 48 | +
|
| 49 | + echo "## Release info file" >> $GITHUB_STEP_SUMMARY |
| 50 | + echo '```' >> $GITHUB_STEP_SUMMARY |
| 51 | + cat test-out.txt >> $GITHUB_STEP_SUMMARY |
| 52 | + echo "" >> $GITHUB_STEP_SUMMARY |
| 53 | + echo '```' >> $GITHUB_STEP_SUMMARY |
0 commit comments