Skip to content

Commit ed63b12

Browse files
authored
add test workflow (#2)
1 parent 342ba37 commit ed63b12

File tree

4 files changed

+64
-19
lines changed

4 files changed

+64
-19
lines changed

.github/workflows/all.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: All
2+
3+
on:
4+
push:
5+
branches: [ "**" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
concurrency:
10+
group: "all"
11+
cancel-in-progress: false
12+
13+
jobs:
14+
run:
15+
runs-on: ubuntu-latest
16+
permissions: write-all
17+
steps:
18+
- name: Install dependencies
19+
run: |
20+
sudo apt update
21+
sudo apt install -y llvm-dev libclang-dev clang
22+
- name: Install rust
23+
uses: moonrepo/setup-rust@v1
24+
- name: Checkout code
25+
uses: actions/checkout@v4
26+
- name: Build project
27+
run: cargo build
28+
- name: Test project
29+
run: cargo test
30+
- name: Setup Pages
31+
# if: github.ref == 'refs/heads/main'
32+
uses: actions/configure-pages@v5
33+
- name: Create documents
34+
# if: github.ref == 'refs/heads/main'
35+
run: cargo doc --no-deps
36+
- name: Upload documents artifact
37+
# if: github.ref == 'refs/heads/main'
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: './target/doc/'
41+
- name: Deploy to GitHub Pages
42+
# if: github.ref == 'refs/heads/main'
43+
id: deployment
44+
uses: actions/deploy-pages@v4
45+
- name: Login to Github registry
46+
# if: github.ref == 'refs/heads/main'
47+
uses: docker/login-action@v2
48+
with:
49+
registry: ghcr.io
50+
username: ${{ github.actor }}
51+
password: ${{ secrets.GITHUB_TOKEN }}
52+
- name: Build Docker images
53+
# if: github.ref == 'refs/heads/main'
54+
run: |
55+
docker build . --tag ghcr.io/${{ github.repository }}/journal-sdk:latest
56+
docker build . --tag ghcr.io/${{ github.repository }}/journal-sdk:$( cargo pkgid | cut -d '@' -f 2 )
57+
- name: Push Docker images
58+
# if: github.ref == 'refs/heads/main'
59+
run: |
60+
docker push ghcr.io/${{ github.repository }}/journal-sdk:latest
61+
docker push ghcr.io/${{ github.repository }}/journal-sdk:$( cargo pkgid | cut -d '@' -f 2 )

.github/workflows/docker.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "journal-sdk"
3-
version = "1.1.0"
3+
version = "1.0.1"
44
edition = "2021"
55

66
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,5 @@ The [./lisp](./lisp) folder provides some examples.
104104

105105
In general, this software still undergoing development.
106106
Functionality and interfaces may change at any time.
107+
108+
// test ci/cd

0 commit comments

Comments
 (0)