-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Broadcast vanish requests #14
Merged
Merged
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
5eb9afe
Broadcast vanish requests
dcadenas f264a4c
Add tests, use nos-changes branch
dcadenas 8391733
Delete from vanish requests
dcadenas 14d039f
Cleanup + comments
dcadenas 1c4f259
Better test
dcadenas a28048a
More coverage, run_tests.sh, pass traits
dcadenas 454ce21
Integration test and CI workflow
dcadenas 9d37c9d
Merge pull request #15 from planetary-social/delete_from_vanish_request
dcadenas 4623b92
More CI workflow changes
dcadenas 00c2393
Integration tests, CI workflow, vanish from command line
dcadenas e74b6c2
Better comment
dcadenas 20b0789
Use is_default_branch syntax
dcadenas 758d975
Setup ring
dcadenas 105b1b4
Test for CI issue
dcadenas 30fbb2b
Pin Deno version
dcadenas b1c34f5
One more try
dcadenas d672464
Try disabling cache
dcadenas dd621dd
Try disabling integration test
dcadenas 9d4fc22
Try again with removed caches, linux/amd64 and tests enabled
dcadenas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: CI Pipeline | ||
|
||
on: | ||
push: | ||
branches: ['main'] | ||
pull_request: | ||
branches: ['main'] | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
jobs: | ||
test: | ||
name: Run Integration Tests | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Docker Buildx | ||
if: ${{ !env.ACT }} | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build Docker image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: false | ||
tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:test | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max | ||
|
||
- name: Run integration tests | ||
run: | | ||
docker compose up --abort-on-container-exit --exit-code-from tests | ||
|
||
- name: Check for test failures | ||
if: failure() | ||
run: | | ||
echo "Tests failed, check the logs for details." | ||
|
||
build_and_push: | ||
name: Build and Push Docker image | ||
needs: test | ||
runs-on: ubuntu-latest | ||
if: ${{ github.ref == 'refs/heads/main' && needs.test.result == 'success' }} | ||
permissions: | ||
packages: write | ||
contents: read | ||
|
||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Log in to the GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Docker Buildx | ||
if: ${{ !env.ACT }} | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
id: meta | ||
uses: docker/metadata-action@v4 | ||
with: | ||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch,suffix=_{{ github.sha }} | ||
type=raw,value=latest,enable={{ github.ref == 'refs/heads/main' }} | ||
|
||
- name: Build and push Docker image. The build was cached | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,30 @@ | ||
services: | ||
nosrelay: | ||
build: . | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
ports: | ||
- "7777:7777" | ||
environment: | ||
- RELAY_URL=wss://example.com | ||
- REDIS_URL=redis://redis:6379 | ||
depends_on: | ||
- redis | ||
|
||
redis: | ||
image: redis:7.2.4 | ||
ports: | ||
- "6379:6379" | ||
command: redis-server --loglevel notice | ||
|
||
tests: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
target: tests | ||
environment: | ||
- RELAY_URL=wss://example.com | ||
- REDIS_URL=redis://redis:6379 | ||
depends_on: | ||
- redis | ||
restart: "no" |
File renamed without changes.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't want to publish new docker images on every pull request commit, or do we?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to, because the integration tests run the full code as compose.yml describes. This way we can have the sh script hit all the complete services using even external tools like nak etc