-
Notifications
You must be signed in to change notification settings - Fork 2
124 lines (106 loc) · 3.39 KB
/
compat.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
121
122
123
124
name: Compatibility
on:
pull_request:
paths-ignore:
- "**/*.md"
push:
branches:
- main
- "renovate/**"
paths-ignore:
- "**/*.md"
schedule:
- cron: "0 0 * * 0"
merge_group:
types: [checks_requested]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
RESTIC_REPOSITORY: rest:http://restic:[email protected]:8000/ci_repo
RESTIC_PASSWORD: restic
jobs:
test-restic:
name: Test server with restic
runs-on: ${{ matrix.job.os }}
strategy:
matrix:
rust: [stable]
job:
- os: macos-latest
- os: ubuntu-latest
- os: windows-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
if: github.event_name != 'pull_request'
with:
fetch-depth: 0
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
if: github.event_name == 'pull_request'
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Setup Restic
uses: rustic-rs/setup-restic@main
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
with:
toolchain: stable
- name: Run server in background
run: cargo run -- serve -c tests/fixtures/test_data/rustic_server.toml -v &
- name: Run restic
shell: bash
run: |
restic init
restic backup tests/fixtures/test_data/test_repo_source
restic backup tests/fixtures/test_data/test_repo_source
restic check
restic forget --keep-last 1 --prune
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
# test-hurl:
# name: Test server with hurl
# runs-on: ${{ matrix.job.os }}
# strategy:
# matrix:
# rust: [stable]
# job:
# - os: macos-latest
# - os: ubuntu-latest
# - os: windows-latest
# steps:
# - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
# if: github.event_name != 'pull_request'
# with:
# fetch-depth: 0
# - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
# if: github.event_name == 'pull_request'
# with:
# ref: ${{ github.event.pull_request.head.sha }}
# fetch-depth: 0
# - name: Install Rust toolchain
# uses: dtolnay/rust-toolchain@1482605bfc5719782e1267fd0c0cc350fe7646b8 # v1
# with:
# toolchain: stable
# - name: Install hurl
# uses: taiki-e/install-action@c6dc131d2c4291552cafb840290190a53b2cd937 # v2
# with:
# tool: hurl
# - name: Run server in background
# run: cargo run -- serve -c tests/fixtures/test_data/rustic_server.toml -v &
# - name: Run hurl
# shell: bash
# run: |
# hurl -i tests/fixtures/hurl/endpoints.hurl
# - uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2
result:
name: Result (Compat)
runs-on: ubuntu-latest
needs:
- test-restic
steps:
- name: Mark the job as successful
run: exit 0
if: success()
- name: Mark the job as unsuccessful
run: exit 1
if: "!success()"