Delete Cirrus CI files

This commit is contained in:
Simon Binder 2020-11-20 20:02:12 +01:00
parent 05feecf32c
commit e067b00375
No known key found for this signature in database
GPG Key ID: 7891917E4147B8C0
14 changed files with 12 additions and 228 deletions

View File

@ -1,21 +0,0 @@
# Run tasks with the dart SDK installed by default
container:
# todo: Remove before merging
dockerfile: tool/nnbd.Dockerfile
memory: 12G
cpu: 4
task:
pub_cache:
folder: $HOME/.pub-cache
environment:
CODECOV_TOKEN: ENCRYPTED[6322a159d9b7692b999d13fa2bc7981c8b61ecb1ac18ae076864f1355ee9b65088b2bf9d97d7860196e58bf1db5708af]
dart_version_script: dart --version
pub_get_script: tool/pub_get.sh
analyze_script: tool/analyze.sh
test_moor_script: tool/test_moor.sh
test_sqlparser_script: tool/test_sqlparser.sh
misc_integration_test_script: tool/misc_integration_test.sh
# We just get too many timeouts for moor_generator in the CI runner
# test_moor_generator_script: tool/test_generator.sh
format_coverage_script: tool/upload_coverage.sh

View File

@ -34,7 +34,9 @@ jobs:
- uses: actions/upload-artifact@v2
with:
name: moor-coverage-data
path: moor/coverage/
path: |
moor/coverage/
moor/.dart_tool/package_config.json
retention-days: 1
moor_generator:
@ -74,7 +76,9 @@ jobs:
- uses: actions/upload-artifact@v2
with:
name: sqlparser-coverage-data
path: sqlparser/coverage
path: |
sqlparser/coverage/
sqlparser/.dart_tool/package_config.json
retention-days: 1
misc_integration_tests:
@ -101,11 +105,11 @@ jobs:
- uses: actions/download-artifact@v2
with:
name: moor-coverage-data
path: moor/coverage/
path: moor/
- uses: actions/download-artifact@v2
with:
name: sqlparser-coverage-data
path: sqlparser/coverage/
path: sqlparser/
- run: dart run extras/coverage_formatting/bin/coverage.dart
name: "Format coverage from raw data"
- uses: codecov/codecov-action@v1

View File

@ -31,7 +31,8 @@ Future runForProject(String projectName) async {
final hitmap = await parseCoverage(files, 1);
final resolver = MoorResolver(
projectRoot: projectName, packagesPath: p.join(projectName, '.packages'));
projectRoot: projectName,
packagesPath: p.join(projectName, '.dart_tool', 'package_config.json'));
final output =
await LcovFormatter(resolver, reportOn: [p.join(projectName, 'lib')])

View File

@ -18,6 +18,8 @@ dependencies:
dev_dependencies:
analyzer: ^0.40.6
build_test: ^1.3.0
build_runner_core: ^6.1.0
moor_generator: ^3.2.0
uuid: ^2.0.0
path: ^1.6.4

View File

@ -1,31 +0,0 @@
import 'dart:io';
/// Runs all test files individually.
///
/// For some reason, coverage collection times out when running them all at once
/// with null safety enabled, so this is what we have to do now.
Future<void> main() async {
final directory = Directory('test');
var hadFailures = false;
await for (final entity in directory.list(recursive: true)) {
if (entity is! File || !entity.path.endsWith('_test.dart')) continue;
final process = await Process.start('dart', [
'--no-sound-null-safety',
'run',
'test',
'--coverage=coverage',
entity.path
]);
await Future.wait(
[stdout.addStream(process.stdout), stderr.addStream(process.stderr)]);
final exitCode = await process.exitCode;
if (exitCode != 0) {
hadFailures = true;
}
}
exit(hadFailures ? 1 : 0);
}

View File

@ -1,17 +0,0 @@
FROM ubuntu:rolling
RUN apt-get update && apt-get install -y --no-install-recommends apt-transport-https wget gnupg2 ca-certificates curl git
# Setup for Dart
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
RUN wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list
ENV PATH="/usr/lib/dart/bin:${PATH}"
# Setup for Google Chrome
RUN echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list
#RUN apt-get update && apt-get install -y --no-install-recommends -q libsqlite3-dev google-chrome-stable firefox dart
RUN apt-get update && apt-get install -y --no-install-recommends -q libsqlite3-dev dart
# We ocassionally have to change this file to manually trigger rebuilds in the CI. Particularly, after a new Dart SDK
# version is out. Prefer to use Dart 2.10 or above.

View File

@ -1,35 +0,0 @@
#!/usr/bin/env bash
EXIT_CODE=0
cd moor
echo $(pwd)
dart format -o none --set-exit-if-changed . || EXIT_CODE=$?
dart analyze --fatal-infos --fatal-warnings || EXIT_CODE=$?
cd ..
# todo we don't analyze this subproject because Flutter isn't installed in the CI
#cd moor_flutter
#echo $(pwd)
#dartfmt -n --set-exit-if-changed . || EXIT_CODE=$?
#dartanalyzer --options analysis_options.yaml --fatal-infos --fatal-warnings lib/ || EXIT_CODE=$?
#cd ..
#cd moor_ffi
#echo $(pwd)
#dartfmt -n --set-exit-if-changed . || EXIT_CODE=$?
#dartanalyzer --options analysis_options.yaml --fatal-infos --fatal-warnings lib/ test/ || EXIT_CODE=$?
#cd ..
cd moor_generator
echo $(pwd)
dart format -o none --set-exit-if-changed . || EXIT_CODE=$?
dart analyze --fatal-infos --fatal-warnings || EXIT_CODE=$?
cd ..
cd sqlparser
echo $(pwd)
dart format -o none --set-exit-if-changed . || EXIT_CODE=$?
dart analyze --fatal-infos --fatal-warnings || EXIT_CODE=$?
exit $EXIT_CODE

View File

@ -1,3 +0,0 @@
FROM google/dart:2.12-beta
RUN apt-get update && apt-get install -y --no-install-recommends apt-transport-https wget gnupg2 ca-certificates curl git libsqlite3-dev

View File

@ -1,30 +0,0 @@
#!/usr/bin/env bash
EXIT_CODE=0
cd moor
echo $(pwd)
pub upgrade || EXIT_CODE=$?
cd ..
#cd moor_flutter
#echo $(pwd)
#flutter packages upgrade
#cd ..
cd moor_generator
echo $(pwd)
pub upgrade || EXIT_CODE=$?
cd ..
cd sqlparser
echo $(pwd)
pub upgrade || EXIT_CODE=$?
cd ..
#cd moor_ffi
#echo $(pwd)
#flutter packages upgrade
#cd ..
exit $EXIT_CODE

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
cd moor_generator
# todo figure out why analyzer tests don't run on the CI (it throws an internal error)
pub run test --exclude-tags analyzer

View File

@ -1,16 +0,0 @@
#!/usr/bin/env bash
EXIT_CODE=0
cd moor || exit 1
pub run build_runner build --delete-conflicting-outputs
dart run tool/run_tests.dart || EXIT_CODE=$?
#dart --no-sound-null-safety run test --coverage=coverage || EXIT_CODE=$?
# Testing on the web doesn't work on CI (we're running into out-of-memory issues even with 12G of RAM)
#if [ $EXIT_CODE -eq 0 ]
# then pub run test -P browsers || EXIT_CODE=$?
#fi
exit $EXIT_CODE

View File

@ -1,4 +0,0 @@
#!/usr/bin/env bash
cd sqlparser
pub run test --coverage=coverage

View File

@ -1,51 +0,0 @@
#!/bin/bash
# Created with package:mono_repo v1.2.1
# We don't use travis, but this let's us run mono_repo presubmit locally
if [ -z "$PKG" ]; then
echo -e '\033[31mPKG environment variable must be set!\033[0m'
exit 1
fi
if [ "$#" == "0" ]; then
echo -e '\033[31mAt least one task argument must be provided!\033[0m'
exit 1
fi
pushd $PKG
pub upgrade || exit $?
EXIT_CODE=0
while (( "$#" )); do
TASK=$1
case $TASK in
command) echo
echo -e '\033[1mTASK: command\033[22m'
echo -e 'pub run build_runner build -v --delete-conflicting-outputs'
pub run build_runner build -v --delete-conflicting-outputs || EXIT_CODE=$?
;;
dartanalyzer) echo
echo -e '\033[1mTASK: dartanalyzer\033[22m'
echo -e 'dartanalyzer --fatal-infos --fatal-warnings lib/ test/'
dartanalyzer --fatal-infos --fatal-warnings lib/ test/ || EXIT_CODE=$?
;;
dartfmt) echo
echo -e '\033[1mTASK: dartfmt\033[22m'
echo -e 'dartfmt -n --set-exit-if-changed .'
dartfmt -n --set-exit-if-changed . || EXIT_CODE=$?
;;
test) echo
echo -e '\033[1mTASK: test\033[22m'
echo -e 'pub run test'
pub run test || EXIT_CODE=$?
;;
*) echo -e "\033[31mNot expecting TASK '${TASK}'. Error!\033[0m"
EXIT_CODE=1
;;
esac
shift
done
exit $EXIT_CODE

View File

@ -1,9 +0,0 @@
#!/usr/bin/env bash
pushd extras/coverage_formatting
pub upgrade --no-precompile
popd
dart extras/coverage_formatting/bin/coverage.dart
bash <(curl -s https://codecov.io/bash) -f lcov.info