Skip to content

Very WIP: Port to julia #1443

Very WIP: Port to julia

Very WIP: Port to julia #1443

Workflow file for this run

name: Run Tests
on:
push:
branches:
- master
pull_request:
jobs:
test:
name: Julia ${{ matrix.version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- '1'
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-runtest@v1
with:
project: julia
coverage: true
- uses: julia-actions/julia-processcoverage@v1
with:
directories: julia/src
- uses: codecov/codecov-action@v4
with:
files: lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t tagbot:test .
- name: Test Docker image loads
run: |
docker run --rm tagbot:test julia --color=yes --project=/app -e '
using TagBot
println("TagBot v", TagBot.VERSION, " loaded successfully")'
- name: Run tests in Docker
run: |
docker run --rm tagbot:test julia --color=yes --project=/app -e '
using Pkg
Pkg.test()'
- name: Run Docker integration test
env:
INPUT_TOKEN: ${{ github.token }}
run: |
# Clone Example.jl - a small, stable, registered package
git clone --depth=100 https://github.com/JuliaLang/Example.jl.git /tmp/Example.jl
# Run TagBot in the Docker container exactly as action.yml would
# (same CMD, same env vars GitHub Actions sets)
docker run --rm \
-v /tmp/Example.jl:/github/workspace:ro \
-e GITHUB_ACTIONS=true \
-e GITHUB_WORKSPACE=/github/workspace \
-e GITHUB_REPOSITORY=JuliaLang/Example.jl \
-e INPUT_TOKEN="${INPUT_TOKEN}" \
-e INPUT_REGISTRY=JuliaRegistries/General \
-e INPUT_SSH= \
-e INPUT_GPG= \
-e INPUT_DRAFT=false \
-e INPUT_BRANCHES=false \
-e INPUT_DISPATCH=false \
-e INPUT_DISPATCH_DELAY=5 \
-e INPUT_USER=github-actions[bot] \
-e INPUT_EMAIL=41898282+github-actions[bot]@users.noreply.github.com \
tagbot:test
# The container runs `julia -e "using TagBot; TagBot.main()"` by default
# For Example.jl (fully tagged), it should exit successfully with "No new versions"
integration:
name: Integration Test (Example.jl)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
with:
project: julia
- name: Clone test package (Example.jl)
run: git clone --depth=100 https://github.com/JuliaLang/Example.jl.git /tmp/Example.jl
- name: Run TagBot main() like action.yml does
env:
GITHUB_ACTIONS: true
GITHUB_WORKSPACE: /tmp/Example.jl
INPUT_TOKEN: ${{ github.token }}
INPUT_REGISTRY: JuliaRegistries/General
INPUT_SSH: ''
INPUT_GPG: ''
INPUT_DRAFT: 'false'
INPUT_BRANCHES: 'false'
INPUT_DISPATCH: 'false'
INPUT_DISPATCH_DELAY: '5'
INPUT_USER: github-actions[bot]
INPUT_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
run: |
cd julia
# Override GitHub's built-in GITHUB_REPOSITORY for testing
export GITHUB_REPOSITORY=JuliaLang/Example.jl
julia --color=yes --project=. -e '
using TagBot
println("="^60)
println("Integration Test - Running TagBot.main()")
println("="^60)
println("Repository: ", ENV["GITHUB_REPOSITORY"])
println("Registry: ", ENV["INPUT_REGISTRY"])
println()
# Run the actual main() function - same as Docker CMD
TagBot.main()
println()
println("="^60)
println("✅ TagBot.main() completed successfully")
println("="^60)
'