Skip to content

Commit 482e12c

Browse files
Merge pull request #1 from birlug/ci
deploy faster than brewing a cup of joe!
2 parents 5fbc363 + bd2fb4a commit 482e12c

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

.github/workflows/ci.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI/CD
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths-ignore:
8+
- 'README.md'
9+
- 'LICENSE.md'
10+
pull_request:
11+
branches:
12+
- main
13+
paths-ignore:
14+
- 'README.md'
15+
- 'LICENSE.md'
16+
17+
env:
18+
CARGO_TERM_COLOR: always
19+
20+
jobs:
21+
test:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v3
25+
- name: running tests
26+
run: cargo test --verbose
27+
28+
deploy:
29+
runs-on: ubuntu-latest
30+
environment: wiseass
31+
needs: test
32+
if: github.ref == 'refs/heads/main'
33+
steps:
34+
- uses: actions/checkout@v3
35+
- name: prepare env
36+
run: touch .env
37+
- name: deploy
38+
run: make deploy
39+
env:
40+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
41+
TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
42+
KV_BINDING: ${{ secrets.KV_BINDING }}
43+
KV_ID: ${{ secrets.KV_ID }}

src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mod tests {
2929
let config = include_str!("../config-example.toml");
3030
let result: Config = toml::from_str(config).unwrap();
3131

32-
assert_eq!(result.bot.admin_users_id, [7357]);
32+
assert_eq!(result.bot.admin_users_id, [UserId(7357)]);
3333
assert_eq!(result.bot.report_chat_id, ChatId(7357));
3434
}
3535
}

0 commit comments

Comments
 (0)