-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (47 loc) · 1.26 KB
/
Copy pathci.yml
File metadata and controls
58 lines (47 loc) · 1.26 KB
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
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Validate Python syntax
run: python -m py_compile bot.py
- name: Validate locale JSON
run: |
python -m json.tool locales/en_US.json > /dev/null
python -m json.tool locales/pt_BR.json > /dev/null
- name: Smoke test imports
run: python -c "import bot, discord; print(discord.__version__)"
docker:
runs-on: ubuntu-latest
needs: validate
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image
uses: docker/build-push-action@v6
with:
context: .
push: false
load: false
tags: everyone-should-know:ci
cache-from: type=gha
cache-to: type=gha,mode=max