-
Notifications
You must be signed in to change notification settings - Fork 2
46 lines (43 loc) · 1.18 KB
/
test-extended.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
name: "Test action - extended"
on:
workflow_dispatch:
push:
branches:
- master
pull_request:
paths:
- '.github/workflows/test-extended.yml'
jobs:
swift-format:
runs-on: ubuntu-latest
container:
image: swift:5.8
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run action with version
uses: ./
with:
url: https://github.com/apple/swift-format
version: '^508.0.1'
- name: Test tool in path
run: |
echo "class Test {}" > ./test.swift
swift-format ./test.swift
sourcery:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run action with version
uses: ./
with:
url: https://github.com/krzysztofzablocki/Sourcery
version: '*'
- name: Test tool in path
run: |
echo "class TestInput {}" > ./input.swift
echo "{% for type in types.all %}{{ type.name }}{% endfor %}" > ./template.stencil
sourcery --disableCache --sources ./input.swift --templates ./template.stencil --output ./result.swift
test -f ./result.swift
test -n "$(grep "TestInput" < ./result.swift)"