add dependabot; run the CI weekly (#203)
diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml
new file mode 100644
index 0000000..2144819
--- /dev/null
+++ b/.github/dependabot.yaml
@@ -0,0 +1,8 @@
+# Dependabot configuration file.
+version: 2
+
+updates:
+ - package-ecosystem: "github-actions"
+ directory: "/"
+ schedule:
+ interval: "monthly"
diff --git a/.github/workflows/file.yml b/.github/workflows/file.yml
index af48b86..04ed79c 100644
--- a/.github/workflows/file.yml
+++ b/.github/workflows/file.yml
@@ -1,11 +1,15 @@
name: Dart
on:
+ schedule:
+ # “At 00:00 (UTC) on Sunday.”
+ - cron: '0 0 * * 0'
push:
branches: [ master ]
pull_request:
branches: [ master ]
- workflow_dispatch:
+
+permissions: read-all
jobs:
correctness:
@@ -13,23 +17,25 @@
strategy:
matrix:
package: [file, file_testing]
+
steps:
- - uses: actions/checkout@v2.3.4
- - uses: dart-lang/setup-dart@v1.2
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
+ - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
with:
sdk: dev
+
- name: Install ${{ matrix.package }} dependencies
- run: |
- cd packages/${{ matrix.package }}
- dart pub upgrade
+ working-directory: packages/${{ matrix.package }}
+ run: dart pub get
+
- name: Verify formatting in ${{ matrix.package }}
- run: |
- cd packages/${{ matrix.package }}
- dart format --output=none --set-exit-if-changed .
+ working-directory: packages/${{ matrix.package }}
+ run: dart format --output=none --set-exit-if-changed .
+
- name: Analyze package ${{ matrix.package }} source
- run: |
- cd packages/${{ matrix.package }}
- dart analyze --fatal-infos
+ working-directory: packages/${{ matrix.package }}
+ run: dart analyze --fatal-infos
+
test:
runs-on: ${{ matrix.os }}
strategy:
@@ -37,16 +43,17 @@
package: [file]
os: [ubuntu-latest, macos-latest, windows-latest]
sdk: [stable, beta, dev]
+
steps:
- - uses: actions/checkout@v2.3.4
- - uses: dart-lang/setup-dart@v1.2
+ - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
+ - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
with:
sdk: ${{ matrix.sdk }}
+
- name: Install ${{ matrix.package }} dependencies
- run: |
- cd packages/${{ matrix.package }}
- dart pub upgrade
+ working-directory: packages/${{ matrix.package }}
+ run: dart pub get
+
- name: Run ${{ matrix.package }} Tests
- run: |
- cd packages/${{ matrix.package }}
- dart pub run test -j1 -rexpanded
+ working-directory: packages/${{ matrix.package }}
+ run: dart pub run test -j1
diff --git a/contrib/c9.sh b/contrib/c9.sh
deleted file mode 100755
index 7562f25..0000000
--- a/contrib/c9.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-# Use this script to bootstrap your Cloud9 environment. This script:
-# - Tests SSH connection to GitHub
-# - Upgrades to the latest Dart SDK
-
-set +e
-echo "Testing connection to GitHub"
-ssh -T "git@github.com"
-SSH_RETURN_CODE=$?
-set -e
-
-# Because GitHub doesn't allow shell access the return code is 1 for success
-# and (afaik) 255 for failure.
-[ $SSH_RETURN_CODE -ne 1 ] && echo "Connection to GitHub failed" && exit 1
-
-echo "Downloading the latest Dart SDK"
-
-# Enable HTTPS for apt.
-sudo apt-get update
-sudo apt-get install apt-transport-https
-# Get the Google Linux package signing key.
-sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
-# Set up the location of the stable repository.
-sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
-
-echo "Updating Dart SDK"
-sudo apt-get update
-sudo apt-get install dart
-echo "Add the following to your .bashrc: 'PATH=$PATH:/usr/lib/dart/bin'"
-
-echo "Installing Dart format..."
-/usr/lib/dart/bin/pub global activate dart_style
-
-echo "Make sure" `git config user.email` "is registered in your GitHub's Account Settings > Emails."
-echo "Make sure" `git config user.name` "is your GitHub user account name."
-echo "Make sure to add your Cloud9 SSH key to your GitHub's Account Settings > SSH Keys, which you can find on your Cloud9 Dashboard (look for 'Show your SSH key'."
-echo "Done."