handles case when publication exists #243
Workflow file for this run
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
name: Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
concurrency: | |
group: test-${{github.ref}} | |
cancel-in-progress: true | |
env: | |
RUST_BACKTRACE: 1 | |
jobs: | |
test: | |
name: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
toolchain: | |
- stable | |
services: | |
gcs: | |
image: brunocalza/fake-gcs-server | |
ports: | |
- 4443:4443 | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Install Cap'n Proto | |
run: | | |
export DEBIAN_FRONTEND=noninteractive | |
sudo apt-get install -y capnproto libcapnp-dev | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Build | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install CockroachDB | |
run: | | |
sudo apt -y install tar wget | |
sudo mkdir -p /usr/local/lib/cockroach | |
wget https://binaries.cockroachdb.com/cockroach-v23.1.9.linux-amd64.tgz | |
tar -xzf cockroach-v23.1.9.linux-amd64.tgz | |
sudo cp -f cockroach-v23.1.9.linux-amd64/cockroach /usr/local/bin/ | |
sudo chmod +x /usr/local/bin/cockroach | |
sudo cp -rf cockroach-v23.1.9.linux-amd64/lib/* /usr/local/lib/cockroach/ | |
working-directory: /tmp | |
- name: Start CockroachDB | |
run: cockroach start-single-node --insecure --store=type=mem,size=0.25 --advertise-addr=localhost --background | |
- name: Test | |
env: | |
EXPORT_BUCKET: ${{ secrets.EXPORT_BUCKET }} | |
EXPORT_CREDENTIALS: ${{ secrets.EXPORT_CREDENTIALS }} | |
EXPORT_SCHEDULE: 1/5 * * * * * | |
EXPORT_ENDPOINT: https://localhost:4443 | |
DATABASE_HOST: localhost:26257 | |
run: cargo test --all -- --nocapture |