Skip to content

Commit

Permalink
Update testing workflow and mark obsolete (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay authored Jul 23, 2024
1 parent 7c8a91f commit bd9a087
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 78 deletions.
101 changes: 32 additions & 69 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,86 +10,49 @@ on:
workflow_dispatch:
inputs:
debug_enabled:
description: 'Debug with tmate set "debug_enabled"'
type: boolean
description: Debug with tmate
required: false
default: "false"
default: false

defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
NIGHTLY_DDEV_PR_URL: "https://nightly.link/ddev/ddev/actions/runs/2682419555/ddev-linux-amd64.zip"
# Allow ddev get to use a github token to prevent rate limiting by tests
DDEV_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This is required for "gautamkrishnar/keepalive-workflow", see "ddev/github-action-add-on-test"
permissions:
actions: write

jobs:
tests:
defaults:
run:
shell: bash

strategy:
matrix:
ddev_version: [stable, HEAD]
# ddev_version: [stable, edge, HEAD, PR]
fail-fast: false

runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master
- name: Environment setup
run: |
brew install bats-core mkcert
mkcert -install
sudo apt-get update >/dev/null && sudo apt-get install -y curl tinyproxy >/dev/null
# Tinyproxy will listen by default on all interfaces, port 8888
printf "Allow 172.0.0.0/8\nAllow 192.168.0.0/16\nAllow 10.0.0.0/8\n" | sudo tee -a /etc/tinyproxy/tinyproxy.conf
sudo systemctl restart tinyproxy
- name: Use ddev stable
if: matrix.ddev_version == 'stable'
run: brew install ddev/ddev/ddev

- name: Use ddev edge
if: matrix.ddev_version == 'edge'
run: brew install ddev/ddev-edge/ddev

- name: Use ddev HEAD
if: matrix.ddev_version == 'HEAD'
run: brew install --HEAD ddev/ddev/ddev

- name: Use ddev PR
if: matrix.ddev_version == 'PR'
run: |
curl -sL --fail -o ddev_linux.zip ${NIGHTLY_DDEV_PR_URL}
unzip ddev_linux.zip
mv ddev /usr/local/bin/ddev && chmod +x /usr/local/bin/ddev
- name: Download docker images
run: |
mkdir junk && pushd junk && ddev config --auto && ddev debug download-images >/dev/null
docker pull memcached:1.6 >/dev/null
- name: tmate debugging session
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
github-token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}

- name: tests
run: |
export TEST_PROXY_URL="http://$(hostname --ip-address):8888/"
bats tests
# keepalive-workflow adds a dummy commit if there's no other action here, keeps
# GitHub from turning off tests after 60 days
- uses: gautamkrishnar/keepalive-workflow@v1
if: matrix.ddev_version == 'stable'


- uses: actions/checkout@v2

- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Proxy Environment setup
run: |
brew install bats-core mkcert
mkcert -install
sudo apt-get update >/dev/null && sudo apt-get install -y curl tinyproxy >/dev/null
# Tinyproxy will listen by default on all interfaces, port 8888
printf "Allow 172.0.0.0/8\nAllow 192.168.0.0/16\nAllow 10.0.0.0/8\n" | sudo tee -a /etc/tinyproxy/tinyproxy.conf
sudo systemctl restart tinyproxy
echo "TEST_PROXY_URL=http://$(hostname --ip-address):8888" >> $GITHUB_ENV
- uses: ddev/github-action-add-on-test@v2
with:
ddev_version: ${{ matrix.ddev_version }}
token: ${{ secrets.GITHUB_TOKEN }}
debug_enabled: ${{ github.event.inputs.debug_enabled }}
addon_repository: ${{ env.GITHUB_REPOSITORY }}
addon_ref: ${{ env.GITHUB_REF }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![tests](https://github.com/ddev/ddev-proxy-support/actions/workflows/tests.yml/badge.svg)](https://github.com/ddev/ddev-proxy-support/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2023.svg)
[![tests](https://github.com/ddev/ddev-proxy-support/actions/workflows/tests.yml/badge.svg)](https://github.com/ddev/ddev-proxy-support/actions/workflows/tests.yml) ![project is maintained](https://img.shields.io/maintenance/yes/2024.svg)

# DDEV Proxy support
# DDEV Proxy support (Apparently obsolete, see [#5](https://github.com/ddev/ddev-proxy-support/issues/5))

Install this with `ddev get ddev/ddev-proxy-support`

Expand Down
6 changes: 0 additions & 6 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,3 @@ pre_install_actions:
project_files:
- docker-compose.proxy-support.yaml
- web-build/pre.Dockerfile.proxy-support

global_files:

post_install_actions:

yaml_read_files:
2 changes: 1 addition & 1 deletion tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ setup() {
# Test proxy will normally come from TEST_PROXY_URL secret in github repo, but defaults to
# a public proxy listed at https://spys.one/en/free-proxy-list/
# This may not be reliable.
export TEST_PROXY_URL=${TEST_PROXY_URL:-http://67.212.186.101:80}
export TEST_PROXY_URL=${TEST_PROXY_URL:-http://93.127.215.97:80}
echo "# Using TEST_PROXY_URL=${TEST_PROXY_URL}" >&3

mkdir -p $TESTDIR
Expand Down

0 comments on commit bd9a087

Please sign in to comment.