Skip to content

Commit

Permalink
add access to php integration test secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
barankaraaslan committed Aug 12, 2024
1 parent 56894ff commit ac209ff
Showing 1 changed file with 33 additions and 8 deletions.
41 changes: 33 additions & 8 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -873,19 +873,44 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: wasmer-cli-linux-x64
- name: Cargo Registry Cache
uses: actions/cache@v3
with:
path: |
~/.cargo/advisory-db
~/.cargo/git
~/.cargo/registry
key: cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cargo target cache
uses: actions/cache@v3
with:
path: |
target/
key: cargo-release-${{ hashFiles('**/Cargo.lock') }}
- run: |
# install rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
. "$HOME/.cargo/env"
# add wasmer cli to PATH
tar -xzf build-wasmer.tar.gz
export PATH=$PATH:$PWD/bin
# login to wasmer registry
wasmer config set registry.url https://registry.wasmer.wtf/graphql
wasmer login ${{ secrets.WAPM_DEV_TOKEN }}
wasmer whoami
# start tests
cargo test --no-fail-fast -- --test-threads 1
docker build -t tmp .
docker run -v $PWD:/app -w /app tmp bash -c " \
export PATH='$PATH:$PWD/bin'
export MYSQL_HOST='${{ vars.MYSQL_HOST }}' &&\
export MYSQL_DBNAME='${{ vars.MYSQL_DBNAME }}' &&\
export MYSQL_USERNAME='${{ secrets.MYSQL_USERNAME }}' &&\
export MYSQL_PASSWORD='${{ secrets.MYSQL_PASSWORD }}' &&\
export MYSQL_PORT='${{ vars.MYSQL_PORT }}' &&\
export MYSQL_CERT='${{ secrets.MYSQL_CERT }}' &&\
export PG_HOST='${{ vars.PG_HOST }}' &&\
export PG_DBNAME='${{ vars.PG_DBNAME }}' &&\
export PG_USERNAME='${{ secrets.PG_USERNAME }}' &&\
export PG_PASSWORD='${{ secrets.PG_PASSWORD }}' &&\
export PG_PORT='${{ vars.PG_PORT }}' &&\
wasmer config set registry.url https://registry.wasmer.io/graphql &&\
wasmer login ${{ secrets.WASMER_PROD_TOKEN }} &&\
wasmer config set registry.url https://registry.wasmer.wtf/graphql &&\
wasmer login ${{ secrets.WAPM_DEV_TOKEN }} &&\
cargo test --no-fail-fast"

0 comments on commit ac209ff

Please sign in to comment.