Skip to content

Commit 372434a

Browse files
authored
Merge pull request #5 from digidem/feat/migrate-to-comapeocat
Migrate to comapeocat
2 parents f704f12 + 245f881 commit 372434a

25 files changed

+2684
-220
lines changed

.github/workflows/docker-test.yml

Lines changed: 70 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,82 @@ on:
44
push:
55
branches: [ main ]
66
pull_request:
7-
branches: [ main ]
7+
types: [opened, synchronize, reopened, ready_for_review]
8+
branches: [ '**' ]
89

910
jobs:
10-
test:
11+
# default permissions: least privilege; override where needed
12+
lint-and-unit:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: oven-sh/setup-bun@v1
19+
with:
20+
bun-version: 1.3.2
21+
- name: Install deps
22+
run: bun install --frozen-lockfile
23+
- name: Lint
24+
run: bun run lint
25+
- name: Unit + integration tests
26+
run: bun test
27+
28+
api-smoke-v2:
1129
runs-on: ubuntu-latest
30+
needs: lint-and-unit
31+
permissions:
32+
contents: read
1233
steps:
13-
- uses: actions/checkout@v3
14-
34+
- uses: actions/checkout@v4
35+
- uses: oven-sh/setup-bun@v1
36+
with:
37+
bun-version: 1.3.2
38+
- name: Install deps
39+
run: bun install --frozen-lockfile
40+
- name: Run API smoke (v2)
41+
run: |
42+
chmod +x ./scripts/test-api.sh
43+
./scripts/test-api.sh --url http://localhost:3000
44+
env:
45+
PORT: 3000
46+
47+
docker-test:
48+
runs-on: ubuntu-latest
49+
needs: lint-and-unit
50+
permissions:
51+
contents: read
52+
steps:
53+
- uses: actions/checkout@v4
1554
- name: Set up Docker Buildx
1655
uses: docker/setup-buildx-action@v2
17-
18-
- name: Run Docker test script
56+
- name: Run Docker test script (v2-focused)
1957
run: |
2058
chmod +x ./scripts/test-mapeo-config.sh
2159
./scripts/test-mapeo-config.sh
60+
61+
docker-publish-pr:
62+
if: github.event_name == 'pull_request'
63+
runs-on: ubuntu-latest
64+
needs: docker-test
65+
permissions:
66+
contents: read
67+
packages: write
68+
steps:
69+
- uses: actions/checkout@v4
70+
- name: Log in to GHCR
71+
uses: docker/login-action@v2
72+
with:
73+
registry: ghcr.io
74+
username: ${{ github.actor }}
75+
password: ${{ secrets.GITHUB_TOKEN }}
76+
- name: Set up Docker Buildx
77+
uses: docker/setup-buildx-action@v2
78+
- name: Build and push PR image
79+
uses: docker/build-push-action@v4
80+
with:
81+
context: .
82+
push: true
83+
tags: ghcr.io/${{ github.repository }}:pr-${{ github.event.number }}
84+
cache-from: type=gha
85+
cache-to: type=gha,mode=max

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,6 @@ dist
176176

177177
# Aider chat history
178178
.aider.chat.history.md
179+
fixtures/*.zip
180+
/tmp/comapeo-test-config.zip
181+
test-config*.zip

0 commit comments

Comments
 (0)