Skip to content

Commit 8e88a74

Browse files
authored
Maintenance upgrades (#1)
Updates.
1 parent 2566f54 commit 8e88a74

33 files changed

+199
-517
lines changed

.github/workflows/test.yaml

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Deploy
2+
on: [pull_request]
3+
env:
4+
PANTS_CONFIG_FILES: +['pants.ci.toml']
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Check out repository code
10+
uses: actions/checkout@v4
11+
12+
- name: Initialize Pants
13+
uses: pantsbuild/actions/init-pants@main
14+
with:
15+
# cache0 makes it easy to bust the cache if needed
16+
gha-cache-key: cache0-py${{ matrix.python_version }}
17+
named-caches-hash: ${{ hashFiles('lockfiles/*.json', '**/something-else.lock') }}
18+
cache-lmdb-store: 'true'
19+
20+
- name: Check BUILD files
21+
run: |
22+
pants tailor --check update-build-files --check ::
23+
24+
# - name: Lint
25+
# run: |
26+
# pants lint ::
27+
28+
- name: Test
29+
run: |
30+
pants test ::
31+
32+
- name: Package
33+
run: |
34+
# We also smoke test that our release process will work by running `package`.
35+
pants package ::
36+
37+
- name: Log in to registry
38+
if: github.head_ref == 'main'
39+
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
40+
41+
- name: Publish
42+
if: github.head_ref == 'main'
43+
run: |
44+
pants publish src/docker::
45+
46+
- name: Upload pants log
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: pants-log
50+
path: .pants.d/pants.log
51+
52+
deploy:
53+
if: github.head_ref == 'main'
54+
runs-on: ubuntu-latest
55+
environment: leaderboard.fly.dev
56+
needs: test
57+
steps:
58+
- name: Check out repository code
59+
uses: actions/checkout@v4
60+
61+
- uses: superfly/flyctl-actions/setup-flyctl@master
62+
63+
- run: flyctl deploy --remote-only
64+
env:
65+
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

3rdparty/BUILD

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ python_requirements(
33
module_mapping={
44
"django-environ": ["environ"],
55
"django-allauth": ["allauth"],
6-
}
6+
"django-simple-menu": ["menu"],
7+
},
78
)

build-support/flake8

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
[flake8]
12
max-line-length = 88
23
extend-ignore = E203

fly.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
app = "leaderboard"
22

33
[build]
4-
image = "gk/web:latest"
4+
image = "ghcr.io/xlevus/gymkhana/web:latest"
55

66

77
[env]
@@ -21,12 +21,12 @@ app = "leaderboard"
2121

2222
[[services.ports]]
2323
handlers = ["http"]
24-
port = "80"
24+
port = 80
2525
force_https = true
2626

2727
[[services.ports]]
2828
handlers = ["tls", "http"]
29-
port = "443"
29+
port = 443
3030

3131
[[services.tcp_checks]]
3232
interval = 10000

0 commit comments

Comments
 (0)