-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
matrix-admin
and e2e tests (#1)
- Loading branch information
1 parent
4c8cea2
commit 2887fa4
Showing
28 changed files
with
849 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- | ||
Developer's Certificate of Origin 1.1 | ||
By making a contribution to this project, I certify that: | ||
(a) The contribution was created in whole or in part by me and I | ||
have the right to submit it under the open source license | ||
indicated in the file; or | ||
(b) The contribution is based upon previous work that, to the best | ||
of my knowledge, is covered under an appropriate open source | ||
license and I have the right under that license to submit that | ||
work with modifications, whether created in whole or in part | ||
by me, under the same open source license (unless I am | ||
permitted to submit under a different license), as indicated | ||
in the file; or | ||
(c) The contribution was provided directly to me by some other | ||
person who certified (a), (b) or (c) and I have not modified | ||
it. | ||
(d) I understand and agree that this project and the contribution | ||
are public and that a record of the contribution (including all | ||
personal information I submit with it, including my sign-off) is | ||
maintained indefinitely and may be redistributed consistent with | ||
this project or the open source license(s) involved. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: 'cargo' | ||
directory: '/' | ||
schedule: | ||
interval: 'weekly' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: [main] | ||
paths: | ||
- "**" | ||
- "!/*.md" | ||
- "!/**.md" | ||
|
||
concurrency: | ||
group: "${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
ci: | ||
name: CI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust Toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
|
||
- name: Setup Rust Cache | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Check formatting | ||
run: cargo fmt --check | ||
|
||
- name: Check clippy | ||
run: cargo clippy --workspace -- -D warnings | ||
|
||
- name: Unit Tests | ||
run: cargo test -p matrix | ||
|
||
# - name: Install Just | ||
# uses: extractions/setup-just@v1 | ||
|
||
# - name: Generate Configuration | ||
# run: just gen_synapse_conf | ||
|
||
# - name: Prepare Data for Tests | ||
# run: docker compose up -d | ||
|
||
# - name: E2E Tests | ||
# env: | ||
# COMMUNE_SYNAPSE_HOST: 'http://0.0.0.0:8008' | ||
# run: cargo test -p test -- --test-threads=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Dependabot auto-approve | ||
on: pull_request_target | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1.1.1 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Approve a PR | ||
run: gh pr review --approve "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Dependabot auto-merge | ||
on: pull_request_target | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
dependabot: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
steps: | ||
- name: Dependabot metadata | ||
id: metadata | ||
uses: dependabot/fetch-metadata@v1.1.1 | ||
with: | ||
github-token: "${{ secrets.GITHUB_TOKEN }}" | ||
- name: Enable auto-merge for Dependabot PRs | ||
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}} | ||
run: gh pr merge --auto --squash "$PR_URL" | ||
env: | ||
PR_URL: ${{github.event.pull_request.html_url}} | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[workspace] | ||
members = [ | ||
"crates/matrix", | ||
"crates/test" | ||
] | ||
resolver = "1" | ||
|
||
[workspace.dependencies] | ||
serde = "1.0.192" | ||
url = { version = "2.4.1", features = ["serde"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[package] | ||
name = "matrix" | ||
version = "0.1.0" | ||
edition = "2021" | ||
publish = false | ||
|
||
[dependencies] | ||
anyhow = "1.0.75" | ||
async-trait = "0.1.74" | ||
hex = "0.4.3" | ||
hmac = "0.12.1" | ||
matrix-sdk = { git = "https://github.com/matrix-org/matrix-rust-sdk.git", rev = "e43a25a" } | ||
reqwest = { version = "0.11.22", features = ["json"] } | ||
serde_path_to_error = "0.1.14" | ||
serde_qs = "0.12.0" | ||
sha1 = "0.10.6" | ||
|
||
# Workspace Dependencies | ||
serde = { workspace = true } | ||
url = { workspace = true } |
Oops, something went wrong.