Skip to content

Commit 21ca494

Browse files
committed
decouple actions
1 parent bca1663 commit 21ca494

File tree

4 files changed

+92
-30
lines changed

4 files changed

+92
-30
lines changed

.github/workflows/docs.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
env:
18+
FOUNDRY_PROFILE: ci
19+
20+
jobs:
21+
check:
22+
strategy:
23+
fail-fast: true
24+
25+
name: Foundry Docs
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
with:
30+
submodules: recursive
31+
32+
- name: Install Foundry
33+
uses: foundry-rs/foundry-toolchain@v1
34+
35+
- name: Show Forge version
36+
run: |
37+
forge --version
38+
39+
- name: Run Forge build
40+
run: |
41+
forge build --sizes
42+
id: build
43+
44+
- name: Generate and patch docs
45+
run: |
46+
bash dev/build-docs.sh
47+
48+
- name: Deploy to GitHub Pages
49+
env:
50+
BRANCH_NAME: ${{ github.ref_name }}
51+
uses: peaceiris/actions-gh-pages@v3
52+
with:
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
publish_dir: ./docs/_build/${{ env.BRANCH_NAME }}/book
55+
publish_branch: gh-pages

.github/workflows/fmt.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
env:
9+
FOUNDRY_PROFILE: ci
10+
11+
jobs:
12+
check:
13+
strategy:
14+
fail-fast: true
15+
16+
name: Foundry Format
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
submodules: recursive
22+
23+
- name: Install Foundry
24+
uses: foundry-rs/foundry-toolchain@v1
25+
26+
- name: Show Forge version
27+
run: |
28+
forge --version
29+
30+
- name: Run Forge fmt
31+
run: |
32+
forge fmt --check
33+
id: fmt

.github/workflows/test.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,14 @@ on:
55
pull_request:
66
workflow_dispatch:
77

8-
permissions:
9-
contents: write
10-
pages: write
11-
id-token: write
12-
13-
concurrency:
14-
group: "pages"
15-
cancel-in-progress: false
16-
17-
env:
188
FOUNDRY_PROFILE: ci
199

2010
jobs:
2111
check:
2212
strategy:
2313
fail-fast: true
2414

25-
name: Foundry project
15+
name: Foundry Tests
2616
runs-on: ubuntu-latest
2717
steps:
2818
- uses: actions/checkout@v4
@@ -36,11 +26,6 @@ jobs:
3626
run: |
3727
forge --version
3828
39-
- name: Run Forge fmt
40-
run: |
41-
forge fmt --check
42-
id: fmt
43-
4429
- name: Run Forge build
4530
run: |
4631
forge build --sizes
@@ -50,16 +35,3 @@ jobs:
5035
run: |
5136
forge test -vvv
5237
id: test
53-
54-
- name: Generate and patch docs
55-
run: |
56-
bash dev/build-docs.sh
57-
58-
- name: Deploy to GitHub Pages
59-
env:
60-
BRANCH_NAME: ${{ github.ref_name }}
61-
uses: peaceiris/actions-gh-pages@v3
62-
with:
63-
github_token: ${{ secrets.GITHUB_TOKEN }}
64-
publish_dir: ./docs/_build/${{ env.BRANCH_NAME }}/book
65-
publish_branch: gh-pages

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Async Swap AMM
22

3-
![Foundry Tests](https://github.com/asyncswap/async-swap/actions/workflows/test.yml/badge.svg)
3+
![Tests](https://github.com/asyncswap/async-swap/actions/workflows/test.yml/badge.svg)
4+
![Format](https://github.com/asyncswap/async-swap/actions/workflows/fmt.yml/badge.svg)
5+
![Docs](https://github.com/asyncswap/async-swap/actions/workflows/docs.yml/badge.svg)
46

57
- [AsyncCSMM - hook contract](src/AsyncSwap.sol)
68
- [Router - add liquidity, swap & fill async orders](src/router.sol)

0 commit comments

Comments
 (0)