Skip to content

Commit c38e19e

Browse files
authored
Merge pull request #2 from reecetech/tests
Test action in workflow
2 parents 7adf33b + fb6eb50 commit c38e19e

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

.github/workflows/test-and-release.yml

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,45 @@ jobs:
2222
with:
2323
strict: true
2424

25+
test-up:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- id: checkout
29+
name: Checkout code 🛒
30+
uses: actions/checkout@v3
31+
32+
- id: checkout-upload
33+
name: Checkout and upload 📦
34+
uses: ./
35+
with:
36+
checkout: 'true'
37+
direction: 'upload'
38+
outputs:
39+
name: ${{ steps.checkout-upload.outputs.name }}
40+
41+
test-down:
42+
runs-on: ubuntu-latest
43+
needs: test-up
44+
steps:
45+
- id: checkout
46+
name: Checkout code 🛒
47+
uses: actions/checkout@v3
48+
49+
- id: checkout-download
50+
name: Download checkout 📥
51+
uses: ./
52+
with:
53+
direction: 'download'
54+
name: ${{ needs.test-up.outputs.name }}
55+
path: 'download/'
56+
57+
- id: test-git
58+
name: Git status 🤷
59+
run: |
60+
set -euo pipefail
61+
cd download
62+
git status
63+
2564
update-doc:
2665
if: ${{ github.ref_name != github.event.repository.default_branch }}
2766
runs-on: ubuntu-latest
@@ -39,15 +78,15 @@ jobs:
3978
action: 'action.yaml'
4079

4180
- id: changes
42-
name: Verify Changed files
81+
name: Verify changed files 🔎
4382
uses: tj-actions/verify-changed-files@v8.6
4483
with:
4584
files: |
4685
README.md
4786
4887
- id: commit
4988
if: steps.changes.outputs.files_changed == 'true'
50-
name: Commit README changes
89+
name: Commit README changes 📥
5190
uses: EndBug/add-and-commit@v9
5291
with:
5392
message: 'Update README'
@@ -59,6 +98,7 @@ jobs:
5998
if: ${{ github.ref_name == github.event.repository.default_branch }}
6099
needs:
61100
- lint
101+
- test-down
62102
runs-on: ubuntu-latest
63103
steps:
64104
- id: checkout

0 commit comments

Comments
 (0)