diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f1524bd50e5..a6636b9250d 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -873,6 +873,20 @@ 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 @@ -880,12 +894,23 @@ jobs: # 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 \ No newline at end of file + 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" \ No newline at end of file