Skip to content

Commit

Permalink
refactor(tests): run domain tests on seprate job
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnwriter committed Nov 3, 2023
1 parent 0e35c09 commit 4717886
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 19 deletions.
21 changes: 2 additions & 19 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Rust
name: Rust Build and Test

on:
push:
Expand All @@ -22,25 +22,8 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up Rust
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Install dependencies
run: |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f -y
- name: Run Test over domains
run: |
curl -qfsSL "https://raw.githubusercontent.com/Azathothas/CertStream-Domains/main/Data/np_ccTLDs/certstream_domains_np_all_24h_httpx.txt" | awk '{print $1}' | grep -i 'http' | sort -u | cargo r -- -b "$(which google-chrome)" --stdin
- name: Count files in hxnshots
run: |
num_files=$(ls -1q hxnshots | wc -l)
echo "Number of files in hxnshots: $num_files"
- name: Calculate directory size
run: |
size=$(du -sh hxnshots | awk '{print $1}')
echo "Size of the directory: $size"
32 changes: 32 additions & 0 deletions .github/workflows/test_on_domains.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Domain Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test-domains:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt-get install -f -y
- name: Run Test over domains
run: |
curl -qfsSL "https://raw.githubusercontent.com/Azathothas/CertStream-Domains/main/Data/np_ccTLDs/certstream_domains_np_all_24h_httpx.txt" | awk '{print $1}' | grep -i 'http' | sort -u | cargo r --release -- -b "$(which google-chrome)" --stdin --timeout 300
- name: Count files in hxnshots
run: |
num_files=$(ls -1q hxnshots | wc -l)
echo "Number of files in hxnshots: $num_files"
- name: Calculate directory size
run: |
size=$(du -sh hxnshots | awk '{print $1}')
echo "Size of the directory: $size"

0 comments on commit 4717886

Please sign in to comment.