forked from selfagency/mastofeedbot
-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (115 loc) · 4.95 KB
/
integration-tests.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
name: Integration tests
on:
push:
jobs:
simple:
runs-on: ubuntu-latest
steps:
- name: Generate cache key
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7
id: generate-key
with:
script: |
core.setOutput('cache-key', new Date().valueOf())
- name: Retrieve cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: ${{ github.workspace }}/mastofeedbot
key: feed-cache-${{ steps.generate-key.outputs.cache-key }}
restore-keys: feed-cache-
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run action
uses: './'
with:
# This is the RSS feed you want to publish
rss-feed: 'https://githubraw.com/joschi/mastofeedbot/main/tests/simple.xml'
# Visibility of the posted status (public | unlisted | private | direct)
status-visibility: unlisted
dry-run: false
# This is your instance address
api-endpoint: ${{ secrets.MASTODON_ENDPOINT }}
# This is the secret you created earlier
api-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
# This is a path to the cache file, using the above cache path
cache-file: ${{ github.workspace }}/mastofeedbot/cache.json
simple-without-cache:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run action
uses: './'
with:
# This is the RSS feed you want to publish
rss-feed: 'https://githubraw.com/joschi/mastofeedbot/main/tests/simple-no-cache.xml'
# Visibility of the posted status (public | unlisted | private | direct)
status-visibility: private
dry-run: false
# This is your instance address
api-endpoint: ${{ secrets.MASTODON_ENDPOINT }}
# This is the secret you created earlier
api-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
# This is a path to the cache file, using the above cache path
cache-file: ${{ github.workspace }}/mastofeedbot/cache.json
simple-dry-run:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run action
uses: './'
with:
# This is the RSS feed you want to publish
rss-feed: 'https://githubraw.com/joschi/mastofeedbot/main/tests/simple.xml'
# Visibility of the posted status (public | unlisted | private | direct)
status-visibility: unlisted
dry-run: true
# This is your instance address
api-endpoint: ${{ secrets.MASTODON_ENDPOINT }}
# This is the secret you created earlier
api-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
# This is a path to the cache file, using the above cache path
cache-file: ${{ github.workspace }}/mastofeedbot/cache.json
simple-sensitive:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run action
uses: './'
with:
# This is the RSS feed you want to publish
rss-feed: 'https://githubraw.com/joschi/mastofeedbot/main/tests/simple-sensitive.xml'
# Visibility of the posted status (public | unlisted | private | direct)
status-visibility: unlisted
# Mark Mastodon status as sensitive content
sensitive: true
# This is your instance address
api-endpoint: ${{ secrets.MASTODON_ENDPOINT }}
# This is the secret you created earlier
api-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
# This is a path to the cache file, using the above cache path
cache-file: ${{ github.workspace }}/mastofeedbot/cache.json
simple-template:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run action
uses: './'
with:
# This is the RSS feed you want to publish
rss-feed: 'https://githubraw.com/joschi/mastofeedbot/main/tests/simple-template.xml'
# Visibility of the posted status (public | unlisted | private | direct)
status-visibility: unlisted
# Template of status posted to Mastodon (Handlebars)
template: |
{{feedData.title}}: {{item.title}}
{{item.link}}
# This is your instance address
api-endpoint: ${{ secrets.MASTODON_ENDPOINT }}
# This is the secret you created earlier
api-token: ${{ secrets.MASTODON_ACCESS_TOKEN }}
# This is a path to the cache file, using the above cache path
cache-file: ${{ github.workspace }}/mastofeedbot/cache.json