Skip to content

Commit

Permalink
ci: add tests to check output filename
Browse files Browse the repository at this point in the history
  • Loading branch information
outloudvi committed Nov 8, 2022
1 parent 4599168 commit c2f94b5
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
test_simple:
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-20.04, ubuntu-22.04]
name: "Test: Simple"
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -26,7 +26,7 @@ jobs:
test_filename:
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04]
os: [ubuntu-20.04, ubuntu-22.04]
name: "Test: With the filename"
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -42,3 +42,24 @@ jobs:

- name: Display the file
run: head -n8 public/api-result.json

test_output_filename:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
name: "Test: Check the output filename"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: suisei-cn/actions-download-file@master
id: downloadfile
name: Download a file
with:
url: "[API Endpoint](https://api.github.com/repos/suisei-cn/actions-download-file)"
target: public/
auto-match: true
- name: Check output filename
run: "[ 'actions-download-file' = '${{ steps.downloadfile.outputs.filename }}' ] && echo 'OK' || exit 1"

- name: Display the file
run: head -n8 public/api-result.json

0 comments on commit c2f94b5

Please sign in to comment.