From 4aef5c143403ba31e076adf07ccb1a48e10f386a Mon Sep 17 00:00:00 2001 From: nelsonic Date: Fri, 18 Aug 2023 03:32:00 +0100 Subject: [PATCH] add .github dir to run GitHub Actions CI + dependabot --- .github/dependabot.yml | 14 ++++++++++++++ .github/workflows/dart.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/elixir.yml | 31 +++++++++++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dart.yml create mode 100644 .github/workflows/elixir.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..42357b6 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: +- package-ecosystem: mix + directory: "/" + schedule: + interval: weekly + time: "17:00" + timezone: Europe/London + ignore: + # ignore all patch updates in dev dependencies ref: github.com/dwyl/technology-stack/issues/126 [alphabetical list] + - dependency-name: "excoveralls" + update-types: ["version-update:semver-patch"] + - dependency-name: "ex_doc" + update-types: ["version-update:semver-patch"] diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml new file mode 100644 index 0000000..1cb973f --- /dev/null +++ b/.github/workflows/dart.yml @@ -0,0 +1,32 @@ +name: Dart CI + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: macos-latest + + steps: + - uses: actions/checkout@v3 + + # Installing Flutter because it's easier to generate .lcov files for test coverage + - name: Install Flutter + uses: subosito/flutter-action@v2 + + - name: Install dependencies + run: dart pub get + + # Your project will need to have tests in test/ and a dependency on + # package:test for this step to succeed. Note that Flutter projects will + # want to change this to 'flutter test'. + - name: Run tests + run: flutter test --coverage + + - uses: codecov/codecov-action@v2 + with: + files: coverage/lcov.info + verbose: true # optional (default = false) \ No newline at end of file diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml new file mode 100644 index 0000000..a967316 --- /dev/null +++ b/.github/workflows/elixir.yml @@ -0,0 +1,31 @@ +name: Elixir CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + build: + name: Build and test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Elixir + uses: erlef/setup-beam@v1 + with: + elixir-version: "1.14.2" # Define the elixir version [required] + otp-version: "25.1.2" # Define the OTP version [required] + - name: Restore dependencies cache + uses: actions/cache@v2 + with: + path: deps + key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }} + restore-keys: ${{ runner.os }}-mix- + - name: Install Elixir dependencies + run: mix deps.get + - name: Run Tests + run: mix coveralls.json + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1