Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): add test-alpine job #1388

Merged
merged 15 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
245 changes: 237 additions & 8 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,8 @@ on:

# Remaining circleci jobs to port
# - build-aarch64:
# - test-alpine:
# - test-alpine-proxy:
# - test-alpine-without-git:
# - test-aarch64:
# - test-aarch64-without-git:
# - test-linux-without-git:
# - test-macos-without-git:
# - test-windows-without-git:
# - review:
# - deploy:
# - release:

Expand Down Expand Up @@ -48,7 +41,7 @@ jobs:

build-alpine:
runs-on: ubuntu-latest
container: alpine:3.18.4@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978
container: alpine:3.19.0@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48
needs: build-linux-and-osx
steps:
- name: Checkout
Expand Down Expand Up @@ -150,6 +143,37 @@ jobs:
path: |
output_linux.txt

test-linux-without-git:
runs-on: ubuntu-latest
needs: build-linux-and-osx
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/download-artifact@v3
with:
name: artifact
- name: Remove .git directory
run: rm -rf .git
- name: Remove test coverage files
run: rm -rf *.coverage.txt coverage-report-test.json test/fixtures || echo
- name: Update exec permission
run: chmod u+x out/codecov-linux
- name: Run Linux binary (dry run)
run: |
out/codecov-linux -F linux-without-git -d -Z | tee -a output_linux_without_git.txt
- name: Run Linux binary (upload)
run: |
out/codecov-linux -F linux-without-git -Z -t ${{ secrets.CODECOV_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
path: |
output_linux_without_git.txt

test-macos:
runs-on: macos-latest
needs: build-linux-and-osx
Expand Down Expand Up @@ -179,6 +203,134 @@ jobs:
path: |
output_osx.txt

test-macos-without-git:
runs-on: macos-latest
needs: build-linux-and-osx
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: artifact
- name: Remove .git directory
run: rm -rf .git
- name: Remove test coverage files
run: rm -rf *.coverage.txt coverage-report-test.json test/fixtures || echo
- name: Update exec permission
run: chmod u+x out/codecov-macos
- name: Run MacOS binary (dry-run)
run: |
out/codecov-macos -F macos-without-git -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} | tee -a output_osx_without_git.txt
- name: Run MacOS binary (upload)
run: |
out/codecov-macos -F macos-without-git -v -Z -t ${{ secrets.CODECOV_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
path: |
output_osx_without_git.txt

test-alpine:
runs-on: ubuntu-latest
container: alpine:3.19.0@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48
needs: build-alpine
steps:
- name: Install git
run: |
apk update
apk add git
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: artifact
- name: Remove test coverage files
run: rm -rf *.coverage.txt coverage-report-test.json test/fixtures || echo
- name: Update exec permission
run: chmod u+x out/codecov-alpine
- name: Run Alpine binary -f (dry run)
run: |
NODE_DEBUG=vm out/codecov-alpine -v -f ./coverage-alpine/cobertura-coverage.xml -F alpine -d -Z -t ${{ secrets.CODECOV_TOKEN }} >> output_alpine.txt
- name: Run Alpine binary auto-detect (dry run)
run: |
out/codecov-alpine -F alpine -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} >> output_alpine.txt
- name: Run Alpine binary (upload)
run: out/codecov-alpine -F alpine -v -Z -t ${{ secrets.CODECOV_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
path: |
output_alpine.txt

test-alpine-without-git:
runs-on: ubuntu-latest
container: alpine:3.19.0@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48
needs: build-alpine
steps:
- name: Install git
run: |
apk update
apk add git
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: artifact
- name: Remove .git directory
run: rm -rf .git
- name: Remove test coverage files
run: rm -rf *.coverage.txt coverage-report-test.json test/fixtures || echo
- name: Update exec permission
run: chmod u+x out/codecov-alpine
- name: Run Alpine binary -f (dry run)
run: |
NODE_DEBUG=vm out/codecov-alpine -v -f ./coverage-alpine/cobertura-coverage.xml -F alpine-without-git -d -Z -t ${{ secrets.CODECOV_TOKEN }} >> output_alpine_without_git.txt
- name: Run Alpine binary auto-detect (dry run)
run: |
out/codecov-alpine -F alpine-without-git -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} >> output_alpine_without_git.txt
- name: Run Alpine binary (upload)
run: out/codecov-alpine -F alpine-without-git -v -Z -t ${{ secrets.CODECOV_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
path: |
output_alpine_without_git.txt

test-alpine-proxy:
runs-on: ubuntu-latest
container: alpine:3.19.0@sha256:51b67269f354137895d43f3b3d810bfacd3945438e94dc5ac55fdac340352f48
needs: build-alpine
steps:
- name: Install git
run: |
apk update
apk add git squid
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: artifact
- name: Start squid
run: squid
- name: Remove test coverage files
run: rm -rf *.coverage.txt coverage-report-test.json test/fixtures || echo
- name: Update exec permission
run: chmod u+x out/codecov-alpine
- name: Run Alpine binary auto-detect (dry run)
run: |
out/codecov-alpine -U http://localhost:3128 -F alpine-without-git -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} >> output_alpine_proxy.txt
- name: Run Alpine binary (upload)
run: out/codecov-alpine -U http://localhost:3128 -F alpine-without-git -v -Z -t ${{ secrets.CODECOV_TOKEN }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
path: |
output_alpine_proxy.txt

test-windows:
runs-on: windows-latest
needs: build-windows
Expand Down Expand Up @@ -212,3 +364,80 @@ jobs:
if-no-files-found: error
path: |
output_win.txt

test-windows-without-git:
runs-on: windows-latest
needs: build-windows
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: artifact
- name: Remove .git directory
run: del -Recurse -Force .git
- name: Remove test coverage files
run: |
Remove-Item -Recurse -Force *.coverage.txt; echo "ok"
Remove-Item -Recurse -Force test/fixtures; echo "ok"
- name: Run Windows binary -f (dry-run)
run: |
dir .
attrib .\coverage\cobertura-coveage.xml
.\out\codecov.exe -f .\coverage\cobertura-coverage.xml -F windows-without-git -d -Z -v -t ${{ secrets.CODECOV_TOKEN }} | tee output_win_without_git.txt
shell: cmd
- name: Run Windows binary auto-detect (dry-run)
run: |
.\out\codecov.exe -F windows-without-git -v -d -Z -t ${{ secrets.CODECOV_TOKEN }} | tee -a output_win_without_git.txt
shell: cmd
- name: Run Windows binary (upload)
run: |
.\out\codecov.exe -F windows-without-git -v -Z -t ${{ secrets.CODECOV_TOKEN }}
shell: cmd
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
path: |
output_win_without_git.txt

review:
runs-on: ubuntu-latest
needs:
- test-alpine
- test-alpine-proxy
- test-alpine-without-git
- test-linux
- test-linux-without-git
- test-macos
- test-macos-without-git
- test-windows
- test-windows-without-git
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- uses: actions/download-artifact@v3
with:
name: artifact
- name: List files
run: tree
- name: Cat output_alpine.txt
run: cat output_alpine.txt
- name: Cat output_alpine_without_git.txt
run: cat output_alpine_without_git.txt
- name: Cat output_linux.txt
run: cat output_linux.txt
- name: Cat output_linux_without_git.txt
run: cat output_linux_without_git.txt
- name: Cat output_osx.txt
run: cat output_osx.txt
- name: Cat output_osx_without_git.txt
run: cat output_osx_without_git.txt
- name: Cat output_win.txt
run: cat output_win.txt
- name: Cat output_win_without_git.txt
run: cat output_win_without_git.txt
16 changes: 8 additions & 8 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"fast-glob": "3.3.2",
"js-yaml": "4.1.0",
"snake-case": "3.0.4",
"undici": "6.2.1",
"undici": "5.28.2",
"validator": "13.11.0",
"yargs": "17.7.2"
},
Expand Down