forked from stellar/go
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from stellar/master
Security code
- Loading branch information
Showing
567 changed files
with
34,635 additions
and
22,132 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
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,59 @@ | ||
name: Galexie Release | ||
|
||
on: | ||
push: | ||
tags: ['galexie-v*'] | ||
|
||
jobs: | ||
|
||
publish-docker: | ||
name: Test and push docker image | ||
runs-on: ubuntu-latest | ||
env: | ||
GALEXIE_INTEGRATION_TESTS_ENABLED: "true" | ||
GALEXIE_INTEGRATION_TESTS_CAPTIVE_CORE_BIN: /usr/bin/stellar-core | ||
# this pins to a version of quickstart:testing that has the same version as STELLAR_CORE_VERSION | ||
# this is the multi-arch index sha, get it by 'docker buildx imagetools inspect stellar/quickstart:testing' | ||
GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE: docker.io/stellar/quickstart:testing@sha256:03c6679f838a92b1eda4cd3a9e2bdee4c3586e278a138a0acf36a9bc99a0041f | ||
GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE_PULL: "false" | ||
STELLAR_CORE_VERSION: 21.3.1-2007.4ede19620.focal | ||
steps: | ||
- name: Set VERSION | ||
run: | | ||
echo "VERSION=${GITHUB_REF_NAME#galexie-v}" >> $GITHUB_ENV | ||
- uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.sha }} | ||
- name: Pull Quickstart image | ||
shell: bash | ||
run: | | ||
docker pull "$GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE" | ||
- name: Install captive core | ||
run: | | ||
# Workaround for https://github.com/actions/virtual-environments/issues/5245, | ||
# libc++1-8 won't be installed if another version is installed (but apt won't give you a helpul | ||
# message about why the installation fails) | ||
sudo apt list --installed | grep libc++ | ||
sudo apt-get remove -y libc++1-* libc++abi1-* || true | ||
sudo wget -qO - https://apt.stellar.org/SDF.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=true sudo apt-key add - | ||
sudo bash -c 'echo "deb https://apt.stellar.org focal unstable" > /etc/apt/sources.list.d/SDF-unstable.list' | ||
sudo apt-get update && sudo apt-get install -y stellar-core="$STELLAR_CORE_VERSION" | ||
echo "Using stellar core version $(stellar-core version)" | ||
- name: Run tests | ||
run: go test -v -race -run TestGalexieTestSuite ./services/galexie/... | ||
|
||
- name: Build docker | ||
run: make -C services/galexie docker-build | ||
|
||
# Push images | ||
- name: Login to DockerHub | ||
uses: docker/login-action@bb984efc561711aaa26e433c32c3521176eae55b | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Push to DockerHub | ||
run: make -C services/galexie docker-push |
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,45 @@ | ||
name: Galexie | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
|
||
jobs: | ||
galexie: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
env: | ||
CAPTIVE_CORE_DEBIAN_PKG_VERSION: 21.3.1-2007.4ede19620.focal | ||
GALEXIE_INTEGRATION_TESTS_ENABLED: "true" | ||
GALEXIE_INTEGRATION_TESTS_CAPTIVE_CORE_BIN: /usr/bin/stellar-core | ||
# this pins to a version of quickstart:testing that has the same version as GALEXIE_INTEGRATION_TESTS_CAPTIVE_CORE_BIN | ||
# this is the multi-arch index sha, get it by 'docker buildx imagetools inspect stellar/quickstart:testing' | ||
GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE: docker.io/stellar/quickstart:testing@sha256:5c8186f53cc98571749054dd782dce33b0aca2d1a622a7610362f7c15b79b1bf | ||
GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE_PULL: "false" | ||
steps: | ||
- name: Install captive core | ||
run: | | ||
# Workaround for https://github.com/actions/virtual-environments/issues/5245, | ||
# libc++1-8 won't be installed if another version is installed (but apt won't give you a helpul | ||
# message about why the installation fails) | ||
sudo apt list --installed | grep libc++ | ||
sudo apt-get remove -y libc++1-* libc++abi1-* || true | ||
sudo wget -qO - https://apt.stellar.org/SDF.asc | APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=true sudo apt-key add - | ||
sudo bash -c 'echo "deb https://apt.stellar.org focal unstable" > /etc/apt/sources.list.d/SDF-unstable.list' | ||
sudo apt-get update && sudo apt-get install -y stellar-core="$CAPTIVE_CORE_DEBIAN_PKG_VERSION" | ||
echo "Using stellar core version $(stellar-core version)" | ||
- name: Pull Quickstart image | ||
shell: bash | ||
run: | | ||
docker pull "$GALEXIE_INTEGRATION_TESTS_QUICKSTART_IMAGE" | ||
- uses: actions/checkout@v3 | ||
with: | ||
# For pull requests, build and test the PR head not a merge of the PR with the destination. | ||
ref: ${{ github.event.pull_request.head.sha || github.ref }} | ||
|
||
- name: Run test | ||
run: go test -v -race -run TestGalexieTestSuite ./services/galexie/... |
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 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
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
Oops, something went wrong.