New Build: 08/12/23 00:11:49 #852
Workflow file for this run
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
name: Github Actions Swift Standard | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test-and-standard-upload: | |
runs-on: macos-10.15 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
- uses: actions/setup-python@v2 | |
- run: pip install requests | |
- name: Install xcode-install | |
run: gem install xcode-install | |
- name: Install xcode 11.7 | |
run: xcversion install 11.7 | |
- name: Xcode Version | |
run: xcodebuild -version | |
- name: Build and Test | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
CORRECT_COVERAGE: ${{ secrets.CORRECT_COVERAGE }} | |
run: | | |
xcodebuild -scheme standard-swift -sdk iphonesimulator -derivedDataPath Build/ -destination 'platform=iOS Simulator,name=iPhone 11,OS=14.4' -enableCodeCoverage YES clean build test | |
cd Build/Build/ProfileData | |
cd $(ls -d */|head -n 1) | |
directory=${PWD##*/} | |
pathCoverage=Build/Build/ProfileData/${directory}/Coverage.profdata | |
cd ../../../../ | |
xcrun llvm-cov export -format="lcov" -instr-profile $pathCoverage Build/Build/Products/Debug-iphonesimulator/standard-swift.app/standard-swift > info.lcov | |
curl -Os https://uploader.codecov.io/latest/macos/codecov | |
chmod +x codecov | |
./codecov -t ${CODECOV_TOKEN} | |
python request.py | |
- name: Upstream to Standards | |
env: | |
GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
COVERAGE_SOURCE_FILE: ${{ secrets.COVERAGE_SOURCE_FILE }} | |
if: ${{ github.event_name == 'push'}} | |
run: | | |
wget --header "Authorization: token ${GH_TOKEN}" \ | |
--header "Accept: application/vnd.github.v3.raw" \ | |
https://api.github.com/repos/codecov/standards/contents/upstream.sh | |
bash upstream.sh |