-
-
Notifications
You must be signed in to change notification settings - Fork 604
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add action to test upload functionallity
- Loading branch information
1 parent
fe69cb1
commit dfa60ae
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Test upload functionallity | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
if: ${{ !contains(github.event.head_commit.message, 'docs:') }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '20.x' | ||
- name: Install sitespeed.io | ||
run: npm ci | ||
- name: Install Chrome | ||
run: | | ||
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | ||
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | ||
sudo apt-get update | ||
sudo apt-get --only-upgrade install google-chrome-stable | ||
google-chrome --version | ||
- name: Setup environment | ||
run: | | ||
docker build -t ssh-server-password test/docker --file Dockerfile.scp | ||
docker run -d -p 2222:22 ssh-server-password | ||
- name: Install local HTTP server | ||
run: npm install serve -g | ||
- name: Start local HTTP server | ||
run: (serve test/data/html/ -l 3001&) | ||
- name: Run Chrome test sending data using scp | ||
run: bin/sitespeed.js http://127.0.0.1:3001/simple/ --xvfb -n 1 --scp.host localhost --scp.port 2222 --scp.username username --scp.password password |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM ubuntu:20.04 | ||
|
||
# Install OpenSSH server | ||
RUN apt-get update && apt-get install -y openssh-server && mkdir /var/run/sshd | ||
|
||
# Create a user for SSH with password | ||
RUN useradd -m -s /bin/bash scpuser && echo "scpuser:password" | chpasswd | ||
|
||
# Configure SSH server to allow password authentication | ||
RUN sed -i 's/^#PasswordAuthentication yes/PasswordAuthentication yes/' /etc/ssh/sshd_config && \ | ||
sed -i 's/^#PermitRootLogin prohibit-password/PermitRootLogin no/' /etc/ssh/sshd_config | ||
|
||
# Expose SSH port | ||
EXPOSE 22 | ||
|
||
# Start the SSH server | ||
CMD ["/usr/sbin/sshd", "-D"] |