From 31b9e98b06ac89e8d39ea661c5768bd207e9b361 Mon Sep 17 00:00:00 2001 From: Thomas Hobson Date: Sun, 14 Mar 2021 13:49:30 +1300 Subject: [PATCH] ci(package): remove privilege --- .github/workflows/package-pr.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/package-pr.yaml b/.github/workflows/package-pr.yaml index f295edc..ccf06be 100644 --- a/.github/workflows/package-pr.yaml +++ b/.github/workflows/package-pr.yaml @@ -11,7 +11,7 @@ on: - 'packages/**' jobs: - check-build: + build-pkg: name: Check that package builds runs-on: ubuntu-latest steps: @@ -29,6 +29,23 @@ jobs: run: | docker run -v $(pwd)'/repo:/piston/repo' -v $(pwd)'/packages:/piston/packages' docker.pkg.github.com/engineer-man/piston/repo-builder $(git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | awk -F/ '{ print $2 "-" $3 }' | sort -u) --no-server + - name: Upload package as artifact + uses: actions/upload-artifact@v2 + with: + name: packages + path: packages/*.pkg.tar.gz + + + test-pkg: + name: Test package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - uses: actions/download-artifact@v2 + with: + name: packages + - name: Write test config file uses: DamianReeves/write-file-action@v1.0 with: @@ -52,7 +69,7 @@ jobs: - name: Run tests run: | docker run -v $(pwd)'/repo:/piston/repo' -v $(pwd)'/packages:/piston/packages' --name piston_fs_repo docker.pkg.github.com/engineer-man/piston/repo-builder $PACKAGES & - docker run -v $(pwd)'/data:/piston' -v $(pwd)'/repo:/repo' --privileged --name api docker.pkg.github.com/engineer-man/piston/api & + docker run -v $(pwd)'/data:/piston' --name api docker.pkg.github.com/engineer-man/piston/api & echo Waiting for API to start.. while [[ "$(curl -s -w '%{http_code}' http://api:6969/runtimes)" != "200" ]]; do sleep 5; done