-
-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (56 loc) · 1.61 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Test
on:
push:
branches:
- "main"
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Create test project
run: |
cd .github/workflows/
cargo new marco-test-one
cd marco-test-one
git init
git config --global user.email "[email protected]"
git config --global user.name "Test"
git add .
git commit -m "first commit"
git remote add origin https://github.com/Test/release-plz-test.git
- name: Run release-plz
id: release-plz
uses: ./ # Uses an action in the root directory
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
project_manifest: .github/workflows/marco-test-one/Cargo.toml
- name: Assert release
env:
RELEASES: ${{ steps.release-plz.outputs.releases }}
run: |
set -e
echo "releases: $RELEASES"
if [ echo "$RELEASES" | jq 'length' != "1" ]; then
echo "too many releases"
exit 1
fi
if [ echo "$RELEASES" | jq '.[0].version' != "0.1.0" ]; then
echo "bad version"
exit 1
fi
if [ echo "$RELEASES" | jq '.[0].tag' != "v0.1.0" ]; then
echo "bad tag"
exit 1
fi
if [ echo "$RELEASES" | jq '.[0].package_name' != "marco-test-one" ]; then
echo "bad package name"
exit 1
fi