Upgrade to HTTP.jl v1. #207
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: CI | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
tags: '*' | |
jobs: | |
all: | |
name: all | |
needs: [test, docker-build] | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "All CI jobs have completed." | |
test: | |
name: Julia ${{ matrix.julia-version }} - ${{ matrix.os }} - use Docker ${{ matrix.docker }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# Keep in sync with pkg-update.yml and the Dockerfile | |
julia-version: | |
- "1.9" | |
os: | |
- ubuntu-latest | |
julia-arch: | |
- x64 | |
docker: | |
- 'true' | |
- 'false' | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.julia-version }} | |
arch: ${{ matrix.julia-arch }} | |
- name: Cache artifacts | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-artifacts | |
with: | |
path: ~/.julia/artifacts | |
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} | |
restore-keys: | | |
${{ runner.os }}-test-${{ env.cache-name }}- | |
${{ runner.os }}-test- | |
${{ runner.os }}- | |
- name: Setup Docker | |
if: ${{ matrix.docker == 'true' }} | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
run: | | |
echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin | |
cp deployment/.env.example deployment/.env | |
make -C deployment local-build | |
make -C deployment up | |
make -C deployment stop-watchtower | |
(make -C deployment logs &) | |
echo "JULIA_PKG_SERVER=http://127.0.0.1:8000" >> ${GITHUB_ENV} | |
echo "JULIA_PKG_SERVER_STORAGE_ROOT=$(pwd)/deployment/storage" >> ${GITHUB_ENV} | |
- uses: julia-actions/julia-buildpkg@latest | |
- uses: julia-actions/julia-runtest@latest | |
- name: Startup time test | |
run: | | |
julia --project bin/startup_time.jl | |
- name: Destroy Docker | |
if: ${{ matrix.docker == 'true' }} | |
run: | | |
make -C deployment destroy | |
docker-build: | |
name: docker-build | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: docker login | |
run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | |
- name: docker build | |
run: docker build -t juliapackaging/pkgserver.jl . | |
- name: docker push | |
if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
run: docker push juliapackaging/pkgserver.jl |